Skip to content
Discussion options

You must be logged in to vote

So one thing is that while your level of detail here is helpful for understanding your objectives, it would be really helpful if you would provide a single piece of code we could copy and paste. To actually run your code I have to stick it together, add imports, and figure out the intended order.

Regarding the KeyError you pasted, it's a little hard to understand because of the transformation of the string key to a hash, but basically you're just trying to do something with a key that doesn't exist. The fix is easy:

exceptions = custom_lemmatizer.lookups.get_table("lemma_exc")
exceptions["part"] = {} # just add a table / dict for "part"
exceptions['part']['na'] = ['to']

Here is a complet…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@jambran
Comment options

@polm
Comment options

@adrianeboyd
Comment options

@roger-yu-ds
Comment options

@polm
Comment options

Answer selected by jambran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat / lemmatizer Feature: Rule-based and lookup lemmatization
5 participants
Converted from issue

This discussion was converted from issue #9980 on January 05, 2022 06:32.