Upstream spencermountain/compromise state of the touched files before 435f27a18b
This commit is contained in:
1 parent
8fd9ece28a
commit
99f9003a2e
2 files changed
+180
No files matched your search
@@ -0,0 +1,73 @@
|
||||
import test from 'tape'
|
||||
import nlp from './_lib.js'
|
||||
|
||||
const words = [
|
||||
'sud den ly',
|
||||
'con sti pa tion',
|
||||
'di a bo lic',
|
||||
'fa ted',
|
||||
'ge ne tic',
|
||||
'hy giene',
|
||||
'o ma ha',
|
||||
'i mi ta ted',
|
||||
'tree',
|
||||
'ci vi lised',
|
||||
'went',
|
||||
'to ge ther',
|
||||
'tog gle',
|
||||
'move ment',
|
||||
'mo ment',
|
||||
'do nate',
|
||||
'vi king',
|
||||
'wat tage',
|
||||
'con gre gate',
|
||||
'some thing',
|
||||
'sales man',
|
||||
're sour ces',
|
||||
'eve ry thing',
|
||||
'eve ry bo dy',
|
||||
'hole',
|
||||
'ho ly',
|
||||
'sec ret',
|
||||
'cause',
|
||||
'fate',
|
||||
'fates',
|
||||
'eu lo gy',
|
||||
'e on',
|
||||
'rea sons',
|
||||
'and',
|
||||
'hoc key',
|
||||
'wild',
|
||||
'fun',
|
||||
'fun ny',
|
||||
'hor ses',
|
||||
'cal ga ry',
|
||||
'tor na do',
|
||||
'pen',
|
||||
'stu dy',
|
||||
'ja mai ca',
|
||||
'tri ni dad',
|
||||
'ca na da',
|
||||
'i ran',
|
||||
'i raq',
|
||||
'sau di a ra bi a',
|
||||
'clin ton',
|
||||
'hub ris',
|
||||
'tur key',
|
||||
'cor si ca',
|
||||
'dev iled',
|
||||
// 'horse',
|
||||
// 'chance',
|
||||
// 'peo ple'
|
||||
]
|
||||
|
||||
test('test length', function (t) {
|
||||
words.forEach(sep => {
|
||||
const str = sep.replace(/ /g, '')
|
||||
const doc = nlp(str)
|
||||
const have = doc.syllables()[0]
|
||||
const want = sep.split(/ /g)
|
||||
t.equal(have.length, want.length, str)
|
||||
})
|
||||
t.end()
|
||||
})
|
||||
Reference in new issue
Block a user