-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix idempotency in to_concepticon
#14
Fix idempotency in to_concepticon
#14
Conversation
Btw, I've been wondering about this sort key function: Lines 343 to 347 in 903b6f1
It seems it compares the part of speech of a match to a variable called |
How bad, yes! |
Can you provide a quick fix? |
Sorry, I should of course do so. In [1]: from pysem.glosses import MAPPINGS
In [2]: MAPPINGS["de"]["arm"]
Out[2]: [['1674', 'POOR', 7, 'adjective', 1]] |
The rows, with the mappings, have the POS information in key=lambda x: (x[-1], 1 if pos == x[-2] else 0, x[-3]),
|
Okay, thanks, I implemented the fix.
Sry for going on another tangent but what do the elements in this list actually mean? From context I can reconstruct:
(I suspect I knew the answer to this at some point and then forgot.) |
0: Concepticon ID |
The argument is: the more often you map something like "you (sg)" to Concepticon THOU, the more comfortable you are to map it another time. |
I think I found the culprit.