Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add word indices to csv #136

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yulikdaniel
Copy link
Collaborator

This PR adds word indices to the csv files created by parser.
It also adds the code reading it in the probing framework, however, not the code using it to enable word probing.

@@ -243,6 +243,6 @@ def filter_sentence(
else:
self.sent_deprels = self.all_deprels()
if self.match_constraints():
return True
return tuple(self.nodes_tokens.values())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

функция возвращает bool, теперь ты возвращает tuple - это ломает тайпинги не только тут, но и те, которые зависили от этой функции

@@ -189,7 +189,7 @@ def find_isomorphism(self) -> bool:
k: {edges[i]} for i, k in enumerate(self.possible_token_pairs)
}
self.nodes_tokens = {
np[i]: [list(self.possible_token_pairs[np])[0][i]]
np[i]: list(self.possible_token_pairs[np])[0][i]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

почему ты удалил скобки? Начальный тип self.nodes_tokens: Dict[str, List[int]], оставляя так, все ломается

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants