You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/Users/nimashahbazi/PycharmProjects/starsem2018-entity-linking-master/entitylinking/core/entity_linker.py", line 126, in main.BaseLinker.link_entities_in_raw_input
Failed example:
l.link_entities_in_raw_input("what was the queen album?")
Exception raised:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run
compileflags, 1), test.globs)
File "<doctest main.BaseLinker.link_entities_in_raw_input[3]>", line 1, in
l.link_entities_in_raw_input("what was the queen album?")
File "/Users/nimashahbazi/PycharmProjects/starsem2018-entity-linking-master/entitylinking/core/entity_linker.py", line 130, in link_entities_in_raw_input
sentence = self.link_entities_in_sentence_obj(sentence, element_id=element_id, num_candidates=num_candidates)
File "/Users/nimashahbazi/PycharmProjects/starsem2018-entity-linking-master/entitylinking/core/entity_linker.py", line 77, in link_entities_in_sentence_obj
caseless=sentence_obj.input_text.islower())
File "/Users/nimashahbazi/PycharmProjects/starsem2018-entity-linking-master/entitylinking/utils.py", line 133, in get_tagged_from_server
properties={**corenlp_properties, **corenlp_caseless} if caseless else corenlp_properties
AttributeError: 'str' object has no attribute 'get'
File "/Users/nimashahbazi/PycharmProjects/starsem2018-entity-linking-master/entitylinking/core/entity_linker.py", line 68, in main.BaseLinker.link_entities_in_sentence_obj
Failed example:
l.link_entities_in_sentence_obj(Sentence("Where does Norway get their oil?")).entities[0]['linkings'] # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
Exception raised:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run
compileflags, 1), test.globs)
File "<doctest main.BaseLinker.link_entities_in_sentence_obj[1]>", line 1, in
l.link_entities_in_sentence_obj(Sentence("Where does Norway get their oil?")).entities[0]['linkings'] # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
IndexError: list index out of range
3 items had failures:
3 of 4 in main.BaseLinker.link_entities_in_raw_input
1 of 2 in main.BaseLinker.link_entities_in_sentence_obj
1 of 1 in main.resolve_entity_overlap_beam_search Test Failed 5 failures.
TestResults(failed=5, attempted=11)
Any ideas how I should resolve it?
The text was updated successfully, but these errors were encountered:
And the second issues seems to be that your environment is configured to run the doctests first. I would turn that off. I have put some doctests in there as examples, but I am not sure those will all pass, as the output is often non-deterministic.
I'm facing the following while trying to run this code:
from entitylinking import core
entitylinker = core.MLLinker(path_to_model="trainedmodels/VectorModel_114.torchweights") output = entitylinker.link_entities_in_raw_input("Barack Obama is a president.") print(output.entities)
Any ideas how I should resolve it?
The text was updated successfully, but these errors were encountered: