Skip to content

Commit

Permalink
remove #1124 list tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
spencermountain committed Jul 29, 2024
1 parent 119c790 commit fabb6e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions scratch.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
import nlp from './src/three.js'
// import plg from './plugins/dates/src/plugin.js'
// nlp.plugin(plg)
// nlp.verbose('tagger')
nlp.verbose('tagger')
//
const text = 'Worst-case Ontario, you get caught.'

const doc = nlp(text)

doc.match('Ontario').replaceWith('scenario', { keepTags: true })
doc.debug()
let doc = nlp(`£151 a`)
// doc.match('(#Cardinal && #Expression)').tag('Value')
doc.numbers().debug()
// -bury
// -ford
// -ton
Expand Down
2 changes: 1 addition & 1 deletion src/2-two/postTagger/model/numbers/numbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ export default [
// 5 square miles
{ match: '#Value [(square|cubic)] #Unit', group: 0, tag: 'Unit', reason: 'square-miles' },
// 5) The expenses
{ match: '^[#Value] (#Determiner|#Gerund)', group: 0, tag: 'Expression', unTag: 'Value', reason: 'numbered-list' },
// { match: '^[#Value] (#Determiner|#Gerund)', group: 0, tag: 'Expression', unTag: 'Value', reason: 'numbered-list' },
]

0 comments on commit fabb6e3

Please sign in to comment.