chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,269 @@
|
||||
module.exports = [
|
||||
`u r cool`,
|
||||
`pretty good`,
|
||||
`i better go`,
|
||||
`walking is cool`,
|
||||
`walking should be fun`,
|
||||
`holy shit`,
|
||||
`aircraft designer`,
|
||||
`u go to the mall`,
|
||||
`but u must`,
|
||||
`that car goes`,
|
||||
`John who goes`,
|
||||
`that car goes`,
|
||||
`a bit much`,
|
||||
`all students`,
|
||||
`work which has been done`,
|
||||
`is just like`,
|
||||
`folks like her`,
|
||||
`john up`,
|
||||
`he had survived`,
|
||||
`were he to survive`,
|
||||
`how`,
|
||||
`how would he`,
|
||||
`which`,
|
||||
`so john`,
|
||||
`how he is driving`,
|
||||
`when i go fishing`,
|
||||
`sun the 5th`,
|
||||
`1pm next sun`,
|
||||
`this sat`,
|
||||
`sat november`,
|
||||
`all march`,
|
||||
`this march`,
|
||||
`next march`,
|
||||
`last may`,
|
||||
`march 5th`,
|
||||
`5 march`,
|
||||
`5th of march`,
|
||||
`march and feb`,
|
||||
`feb to march`,
|
||||
`quickly march`,
|
||||
`march quickly`,
|
||||
`march 5 to 7`,
|
||||
`march the 12th`,
|
||||
`june 7`,
|
||||
`7 june`,
|
||||
`may twenty five`,
|
||||
`in june`,
|
||||
`during june`,
|
||||
`on june`,
|
||||
`by june`,
|
||||
`before june`,
|
||||
`thursday june`,
|
||||
`june 1992`,
|
||||
`june smith`,
|
||||
`june m. cooper`,
|
||||
`one second`,
|
||||
`all fell apart`,
|
||||
`very rusty`,
|
||||
`rusty smith`,
|
||||
`rusty a. smith`,
|
||||
`it is just`,
|
||||
`jack is guarded`,
|
||||
`smoked poutine is`,
|
||||
`baked onions are`,
|
||||
`well made`,
|
||||
`is fucked up`,
|
||||
`jack seems guarded`,
|
||||
`a staggering cost`,
|
||||
`as amusing as`,
|
||||
`more amusing than`,
|
||||
`very amusing`,
|
||||
`it was amusing`,
|
||||
`found it amusing`,
|
||||
`a bit amusing`,
|
||||
`jury is out`,
|
||||
`the sun`,
|
||||
`did a 900`,
|
||||
`the can`,
|
||||
`spencer kelly's`,
|
||||
`Super Corp's fundraiser`,
|
||||
`Los Angeles's fundraiser`,
|
||||
`assign all tasks`,
|
||||
`the above is clear`,
|
||||
`real evil is`,
|
||||
`have big dreams`,
|
||||
`big dreams, critical thinking`,
|
||||
`excellent answer spencer`,
|
||||
`one big reason`,
|
||||
`won widespread support`,
|
||||
`adorable little store`,
|
||||
`very big dreams`,
|
||||
`good wait staff`,
|
||||
`many poses`,
|
||||
`of basic training`,
|
||||
`justifiying higher costs`,
|
||||
`early warning`,
|
||||
`do the dance`,
|
||||
`his fine`,
|
||||
`some pressing issues`,
|
||||
`more walking`,
|
||||
`walking and hushing`,
|
||||
`rock and roll`,
|
||||
`rights of man`,
|
||||
`a bit`,
|
||||
`my first thought`,
|
||||
`running-a-show`,
|
||||
`the-only-reason`,
|
||||
`the nice swim`,
|
||||
`the wait to vote`,
|
||||
`the truly nice swim`,
|
||||
`the test string`,
|
||||
`the orange is`,
|
||||
`a nice deal`,
|
||||
`a sense of`,
|
||||
`a stream runs`,
|
||||
`next career move`,
|
||||
`the threat of force`,
|
||||
`the western line`,
|
||||
`her polling`,
|
||||
`her fines`,
|
||||
`linear algebra`,
|
||||
`a blown motor`,
|
||||
`walk the walk`,
|
||||
`this swimming`,
|
||||
`at some point`,
|
||||
`air-flow`,
|
||||
`is no walk`,
|
||||
`has different views than`,
|
||||
`goes to sleep`,
|
||||
`a great run`,
|
||||
`do so`,
|
||||
`is mark hughes`,
|
||||
`a close`,
|
||||
`what the hell`,
|
||||
`the staff were`,
|
||||
`running for congress`,
|
||||
`running to work`,
|
||||
`any questions for`,
|
||||
`have fun`,
|
||||
`co-founder`,
|
||||
``,
|
||||
`still good`,
|
||||
`still make`,
|
||||
`so hot`,
|
||||
`way hotter`,
|
||||
`way too hot`,
|
||||
`all singing`,
|
||||
`sing like an angel`,
|
||||
`barely even walk`,
|
||||
`even held`,
|
||||
`even left`,
|
||||
`cheering hard`,
|
||||
`much appreciated`,
|
||||
`is well`,
|
||||
`a bit cold`,
|
||||
`dark green`,
|
||||
`kinda sparkly`,
|
||||
`1 800 232-9873`,
|
||||
`(454) 232-9873`,
|
||||
`chinese yuan`,
|
||||
`5 yan`,
|
||||
`minus 7`,
|
||||
`5 kg.`,
|
||||
`seven point five`,
|
||||
`ten bucks`,
|
||||
`quarter million`,
|
||||
`thousand and two`,
|
||||
`a hour`,
|
||||
`amusing his aunt`,
|
||||
`loving you`,
|
||||
`slowly stunning`,
|
||||
`like`,
|
||||
`do not simply like`,
|
||||
`does mean`,
|
||||
`i mean`,
|
||||
`he left`,
|
||||
`this rocks`,
|
||||
`was walking`,
|
||||
`would walk`,
|
||||
`would have had`,
|
||||
`would be walking`,
|
||||
`had been walking`,
|
||||
`will walk`,
|
||||
`about to go`,
|
||||
`would be walking`,
|
||||
`were being run`,
|
||||
`have run`,
|
||||
`would have had`,
|
||||
`had been walking`,
|
||||
`was being driven`,
|
||||
`foo-up`,
|
||||
`fall over`,
|
||||
`back it up`,
|
||||
`will be running`,
|
||||
`march to`,
|
||||
`must march`,
|
||||
`let him glue`,
|
||||
`he quickly foo`,
|
||||
`will secure our`,
|
||||
`he disguised the thing`,
|
||||
`is eager to go`,
|
||||
`open the door`,
|
||||
`compromises are possible`,
|
||||
`would wade`,
|
||||
`to mark`,
|
||||
`wade smith`,
|
||||
`wade m. Cooper`,
|
||||
`damn them`,
|
||||
`West Norforlk`,
|
||||
`Foo District`,
|
||||
`District of Foo`,
|
||||
`in Foo California`,
|
||||
`in houston`,
|
||||
`houston texas`,
|
||||
`John & Joe's`,
|
||||
`teachers union of Ontario`,
|
||||
`walmart USA`,
|
||||
`organization`,
|
||||
`FitBit Inc`,
|
||||
`the OCED`,
|
||||
`global trade union`,
|
||||
`schools`,
|
||||
`is foo Smith`,
|
||||
`pope francis`,
|
||||
`Dwayne 'the rock' Johnson`,
|
||||
`my buddy`,
|
||||
`general pearson`,
|
||||
`remove single 'mr'`,
|
||||
`j.k Rowling`,
|
||||
`king of spain`,
|
||||
`lady Florence`,
|
||||
`saint Foo`,
|
||||
`Foo U Ford`,
|
||||
`al sharpton`,
|
||||
`ferdinand de almar`,
|
||||
`Osama bin Laden`,
|
||||
`John L. Foo`,
|
||||
`Andrew Lloyd Webber`,
|
||||
`Mr Foo`,
|
||||
`peter the great`,
|
||||
`faith smith`,
|
||||
`faith m. Smith`,
|
||||
`give to april`,
|
||||
`remind june`,
|
||||
`may waits for`,
|
||||
`may waits to`,
|
||||
`april will`,
|
||||
`may be`,
|
||||
`would april`,
|
||||
`it is may`,
|
||||
`may is`,
|
||||
`with april`,
|
||||
`with april`,
|
||||
`for april`,
|
||||
`this april`,
|
||||
`next april`,
|
||||
`last april`,
|
||||
`wednesday april`,
|
||||
`may 5th`,
|
||||
`5th of may`,
|
||||
`dick van dyke`,
|
||||
`jose de Sucre`,
|
||||
`Jani K. Smith`,
|
||||
`John Foo`,
|
||||
`Joe K. Sombrero`,
|
||||
`Anthony de Marco`,
|
||||
'a half millionth',
|
||||
]
|
||||
@@ -0,0 +1,8 @@
|
||||
// list of all match patterns, Nov 2020
|
||||
let patterns = []
|
||||
patterns = patterns.reduce((h, str) => {
|
||||
h[str] = 0
|
||||
return h
|
||||
}, {})
|
||||
|
||||
module.exports = patterns
|
||||
@@ -0,0 +1,37 @@
|
||||
/* eslint-disable no-console */
|
||||
// try to hit every match in ./tagger/corrections
|
||||
const corpus = require('nlp-corpus') //install with `npm i nlp-corpus --no-save`
|
||||
const nlp = require('../../src')
|
||||
const penn = require('../../tests/_pennSample')
|
||||
const patterns = require('./patterns')
|
||||
const manual = require('./manual').map(str => {
|
||||
return { text: str }
|
||||
})
|
||||
const texts = penn.concat(manual)
|
||||
|
||||
// add some random texts in
|
||||
for (let i = 0; i < 1000; i++) {
|
||||
texts.push({ text: corpus.random() })
|
||||
}
|
||||
|
||||
texts.forEach(sentence => {
|
||||
const doc = nlp(sentence.text)
|
||||
doc.reasons.forEach(r => {
|
||||
patterns[r] += 1
|
||||
})
|
||||
})
|
||||
let arr = Object.keys(patterns).map(k => [k, patterns[k]])
|
||||
arr = arr.sort((a, b) => {
|
||||
if (a[1] > b[1]) {
|
||||
return -1
|
||||
} else if (a[1] < b[1]) {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
})
|
||||
arr.forEach(a => {
|
||||
console.log(a[0] + '\t' + a[1])
|
||||
})
|
||||
|
||||
console.log(arr.filter(a => a[1] === 0).length, ' empty')
|
||||
// console.log(JSON.stringify(arr, null, 2))
|
||||
Reference in New Issue
Block a user