question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

with MITIE, Exception: Invalid range given to ner_training_instance.overlaps_any_entity()

See original GitHub issue

As #139 issue hasn’t been resolved I’ve tried with MITIE and this is the exception that has been raised:

Training to recognize 10 categories: A, B, C, D, E, F, G, H, I, J
Train classifier
extracting text features
now do training
num training samples: 108
C: 200   f-score: 0.539216
C: 400   f-score: 0.539216
C: 300   f-score: 0.539216
C: 100   f-score: 0.539216
C: 0.01   f-score: 0.578431
C: 50.005   f-score: 0.539216
C: 25.0075   f-score: 0.539216
C: 12.5088   f-score: 0.539216
C: 6.25938   f-score: 0.539216
C: 3.13469   f-score: 0.539216
C: 1.57234   f-score: 0.54902
C: 0.791172   f-score: 0.588235
C: 0.55682   f-score: 0.598039
best C: 0.55682
test on train:
 5  0  0  0  0  0  0  0  0  0
 0  7  0  0  0  0  0  0  0  0
 0  0  7  1  0  1  0  0  0  0
 0  0  0 31  0  1  0  0  0  0
 0  0  0  3 10  0  0  0  0  0
 0  0  0  0  0 19  0  0  0  0
 0  0  0  0  0  0  3  0  0  0
 0  0  0  3  0  0  0  3  0  0
 0  0  0  0  0  0  0  0 10  0
 0  0  0  1  0  0  0  0  0  3

overall accuracy: 0.907407
Training time: 2642 seconds.
df.number_of_classes(): 10

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "build/bdist.macosx-10.12-intel/egg/rasa_nlu/train.py", line 65, in <module>
  File "build/bdist.macosx-10.12-intel/egg/rasa_nlu/train.py", line 59, in do_train
  File "build/bdist.macosx-10.12-intel/egg/rasa_nlu/trainers/mitie_trainer.py", line 30, in train
  File "build/bdist.macosx-10.12-intel/egg/rasa_nlu/trainers/mitie_trainer.py", line 54, in train_entity_extractor
  File "/Library/Python/2.7/site-packages/mitie/mitie.py", line 461, in add_entity
    raise Exception("Invalid range given to ner_training_instance.overlaps_any_entity().  "
Exception: Invalid range given to ner_training_instance.overlaps_any_entity().  It overlaps an entity given to a previous call to add_entity().

I don’t know what I’m really doing wrong to not succeed in none of the two confs 😦

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
amn41commented, Feb 7, 2017

MITIE does not allow entities to overlap. So you can’t have a word which belongs to multiple entities. I suspect that’s your problem, but you would have to include the training examples for me to say more. If you’d rather not post them you could also email them to me. A

0reactions
RakeshRai11commented, May 4, 2017

Hi Alan,

I have an issue while using the LUIS json in rasa NLU. Request is processing with MITIE and I am getting the below error message but could not understand what is missing.

raise Exception("Invalid range given to ner_training_instance.overlaps_any_entity(). " Exception: Invalid range given to ner_training_instance.overlaps_any_entity(). It overlaps an entity given to a previous call to add_entity().

I am sending you the json files i am using at your personal email for you review and suggest.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found