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 position information #1

Open
WillemJan opened this issue Jul 26, 2021 · 1 comment
Open

Add position information #1

WillemJan opened this issue Jul 26, 2021 · 1 comment

Comments

@WillemJan
Copy link
Member

Current classifier just spits out the NER's, not the positions of the NER.

@WillemJan
Copy link
Member Author

Trying:
pprint(p.join())
Expecting:
{'bert': [{'ne': 'Albert Einstein', 'pos': 37, 'type': 'person'}]}


File "./ner.py", line 203, in main.BERT
Failed example:
pprint(p.join())
Expected:
{'bert': [{'ne': 'Albert Einstein', 'pos': 37, 'type': 'person'}]}
Got:
{'bert': {'result': [{'confidence': 0.9998026490211487,
'tag': 'O',
'word': '``'},
{'confidence': 0.9999986886978149,
'tag': 'O',
'word': 'Deze'},
{'confidence': 0.9999988079071045,
'tag': 'O',
'word': 'iets'},
{'confidence': 0.9999988079071045,
'tag': 'O',
'word': 'langere'},
{'confidence': 0.9999986886978149,
'tag': 'O',
'word': 'test'},
{'confidence': 0.999998927116394,
'tag': 'O',
'word': 'bevat'},
{'confidence': 0.999998927116394,
'tag': 'O',
'word': 'de'},
{'confidence': 0.9999988079071045,
'tag': 'O',
'word': 'naam'},
{'confidence': 0.9999488592147827,
'tag': 'B-per',
'word': 'Albert'},
{'confidence': 0.9999456405639648,
'tag': 'I-per',
'word': 'Einstein'},
{'confidence': 0.999998927116394, 'tag': 'O', 'word': '.'},
{'confidence': 0.9999988079071045,
'tag': 'O',
'word': "''"}]},
'timing_bert': 0.06761479377746582}

===
Wanted:

{'polyglot': [{'ne': 'Albert Einstein', 'pos': 37, 'type': 'person'}]}

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

No branches or pull requests

1 participant