-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Many thanks for your repo. It works pretty well for my task. However, there is a minor error on your demo code. If readers simply follow your code. There should be an error:
create_mentions(doc, rules_analyzer)
Traceback (most recent call last):
File "", line 1, in
File "/work/huyhien-v/Experiments/Project/fr-coref/coreferee_french/build_mentions.py", line 92, in create_mentions
rules_analyzer = nlp.get_pipe("coreferee").annotator.rules_analyzer
AttributeError: 'LanguageSpecificRulesAnalyzer' object has no attribute 'get_pipe'
It should be create_mention(doc, nlp), and in
for chain in doc._.coref_chains:
... for mention in chain:
... heads = [doc[i] for i in mention.token_indexes]
... mention_phrase = build_mention(heads, rules_analyzer)
... print(heads, '->', mention_phrase)
It should be mention_phrase = build_mention(heads, nlp)
Hope it saves time for others 😸