Wrong term result when contractions are used since 14.2.0
See original GitHub issueSince 14.2.0
, contractions in the analyzed text result in wrong terms results.
Minimal reproduction case:
import compromise from "compromise/three"
const string = `
Test
plane's plane's
`
const usedWords = new Map()
const data = compromise(string)
for (const term of data.terms().json()) {
console.log(term)
const word = term.terms[0].text
if (word !== '') usedWords.set(word, (usedWords.get(word) ?? 0) + 1)
}
console.log(usedWords)
The expected output is Map(2) { 'Test' => 1, "plane's" => 2 }
, which matches the output with 14.1.1
.
The actual output with 14.2.0
is Map(1) { 'Test' => 2 }
.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Prodromal Labor (False Labor): Causes, Symptoms & Duration
Prodromal labor is a type of false labor contraction. It happens in the third trimester of pregnancy and can feel a lot like...
Read more >False vs True Labor: How to Tell the Difference
The timing of the contractions is a big component for recognizing the differences between true and false labor. Here's how tell the ...
Read more >Contractions of English Semi-Modals: The Emancipating ...
2-3: Use of contracted semi-modals in the BNC (from Krug 2000:175). 28. 2-4: Outline of processing stages in word production (adapted from Levelt....
Read more >compromise/changelog.md at master - GitHub
compromise uses semver, and pushes to npm and github frequently. Major is a breaking api change - method or response changes that can...
Read more >Angular language service not working in vscode
I use Angular Language Service version 12.2.0. The solution that worked for me is to enable legacy view engine language service.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yep, this looks like a bug
will check it out.
Thanks for fixing both of these issues so fast! I can confirm everything is working properly now. 🙂