Open edoust opened 11 months ago
Hello @edoust ,
I am unable to reproduce, running the code shared above gives:
[[Keyword { text: "4", score: 0.4896546, offsets: [Offset { begin: 8, end: 9 }, Offset { begin: 32, end: 33 }, Offset { begin: 39, end: 40 }] }, Keyword { text: "6", score: 0.435
37995, offsets: [Offset { begin: 44, end: 45 }] }, Keyword { text: "3", score: 0.42764783, offsets: [Offset { begin: 3, end: 4 }, Offset { begin: 63, end: 64 }] }, Keyword { text
: "7", score: 0.4275967, offsets: [Offset { begin: 20, end: 21 }] }, Keyword { text: "1", score: 0.38711178, offsets: [Offset { begin: 49, end: 50 }, Offset { begin: 56, end: 57
}] }, Keyword { text: "2", score: 0.34410587, offsets: [Offset { begin: 15, end: 16 }, Offset { begin: 25, end: 26 }] }]]
Hey @guillaume-be
I noticed this does not happen when I checkout this repo and run the mentioned sentence in the example for keyword extraction.
When I run my code in my provided example project it fails however, with the error mentioned above
Did you test it with my project? Also, I was running it on Windows
I am trying to extract keywords from sentences using the
all-MiniLM-L6-v2
modelWhen using this specific sentence (either alone or in combination with other sentences), the keyword extraction fails:
Up 3 Up 4 Down 2 Up 7 Up 2 Down 4 Down 4 Up 6 Up 1 Down 1 Down 3
I know this may not be a meaningful sentence, but it should not cause all sentences to not be evaluated
Is there a way to fix this, or to know which sentences would fail during evaluation?
This is my repro sample: crash-repro-keywords.zip
It contains this code snippet for evaluating the sentence:
This is the error that is printed:
This is the stack trace: