Repository navigation
- [fix] - possible doc.debug() runtime error
- [fix] - #1286 toCardinal() runtime error
- [new] - improved agreement & sentence-healing after modifications
-
- [new] - consistent
{agree:true}param forprepend, append, insert, remove, replacemethods
- [new] - consistent
-
- [new] - toSingular/toPlural now adjust neighbour verbs/articles
-
- [change] - transform methods now keep titlecased 1st-word, trailing punctuation
-
- [change] - transform methods now keep opening/closing punctuation marks
-
- [change] - applies to conjugation and normalization
- [fix] - false-negative net results #1282
- [fix] - conjugation issues #1269 #1270 #1271 #1272
- [fix] - date-plugin issues #1266 #1268 #1274 #1275 #1279
- [fix] - mutation issues #1280 #1278
- [fix] - decimal-parsing issue #1273
- [change] - improved i18n sentence-splitting
- [new] -
compromise/sharedexport (esm-only), withcheckSpecandeuropeanNumbers - [new] - re-usable internal
nlp.methods().one.parseSpec()
agreement changes:
nlp('Seashells wash up here.').nouns().toSingular()
// before: 'Seashell wash up here.'
// after: 'A seashell washes up here.'
doc = nlp('"Dogs bark" he said.')
doc.match('dogs').prepend('the')
// before: 'The "dogs bark" he said.'
// after: '"The dogs bark" he said.'
doc = nlp('he drank two beers')
doc.numbers().set(1)
// before: he drank one beers
// after: he drank one beer
// opt out with { agree: false }
nlp('she sells seashells').nouns().toSingular({ agree: false })
// 'she sells seashell'