chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:48:55 +08:00
commit c728c8e1e1
1067 changed files with 109127 additions and 0 deletions
+160
View File
@@ -0,0 +1,160 @@
// import nlp from '../../src/three.js'
import nlp from '../../types/one'
const doc = nlp('okay cool')
// ### Lib
nlp.tokenize('adf')
nlp.plugin({})
nlp.parseMatch()
nlp.world()
nlp.model()
nlp.methods()
nlp.hooks()
nlp.verbose()
nlp.version
// ### API
doc.compute('')
doc.forEach(s => s)
doc.map(s => s)
doc.filter(s => s.found)
doc.find(s => s.found)
doc.some(s => s.found)
doc.random()
doc.termList()
doc.terms()
doc.groups()
doc.eq(3)
doc.first()
doc.last()
doc.firstTerms()
doc.lastTerms()
doc.slice(3)
doc.all()
doc.fullSentences()
doc.none()
doc.isDoc()
doc.wordCount()
doc.docs
doc.pointer
doc.methods
doc.model
doc.hooks
doc.isView
doc.found
doc.length
doc.fullPointer
doc.update(null)
doc.toView(null)
doc.fromText('')
doc.clone()
// ### Change
doc.compute('id')
doc.toLowerCase()
doc.toUpperCase()
doc.toTitleCase()
doc.toCamelCase()
doc.concat('')
doc.insertAfter('')
doc.insertBefore('')
doc.remove('')
doc.replace('', '')
doc.replaceWith('')
doc.unique()
doc.reverse()
doc.sort()
doc.pre()
doc.post()
doc.trim()
doc.hyphenate()
doc.dehyphenate()
doc.toQuotations()
doc.toParentheses()
// ### Output
doc.html({})
doc.json()
doc.out()
doc.debug()
doc.text()
doc.wrap({})
// ### Match
nlp.parseMatch()
doc.match('')
doc.matchOne('')
doc.has('')
doc.if('')
doc.ifNo('')
doc.before('')
doc.after('')
doc.growLeft('')
doc.growRight('')
doc.grow('')
doc.splitOn()
doc.splitBefore()
doc.splitAfter()
// ### Pointers
doc.union('')
doc.intersection('')
doc.not('')
doc.complement('')
doc.settle('')
// ### Tag
nlp.addTags({})
doc.compute('tagRank')
doc.tag('')
doc.tagSafe('')
doc.unTag('')
doc.canBe('')
// ### Contractions
doc.compute('contractions')
// ### Tokenize
doc.compute('alias')
doc.compute('machine')
doc.compute('normal')
doc.compute('freq')
doc.compute('offset')
doc.compute('index')
doc.compute('wordCount')
// ### Cache
doc.compute('cache')
doc.cache()
doc.uncache()
// ### Lookup
nlp.buildTrie([''])
doc.lookup({})
// ### Typeahead
nlp.typeahead({})
doc.compute('typeahead')
doc.autoFill()
// ### Lexicon
doc.compute('lexicon')
nlp.addWords({})
+129
View File
@@ -0,0 +1,129 @@
// import nlp from '../../src/three.js'
import nlp from '../../types/three'
const doc = nlp('okay cool')
// ### Chunker
doc.compute('chunks')
doc.chunks()
doc.clauses()
// ### Normalize
doc.normalize()
// ### Redact
doc.redact()
// ### Misc
doc.hyphenated()
doc.hashTags()
doc.emails()
doc.emoji()
doc.emoticons()
doc.atMentions()
doc.urls()
doc.pronouns()
doc.conjunctions()
doc.prepositions()
doc.honorifics()
doc.abbreviations()
doc.phoneNumbers()
doc.acronyms()
doc.acronyms().strip()
doc.parentheses()
doc.parentheses().strip()
doc.possessives()
doc.possessives().strip()
doc.quotations()
doc.quotations().strip()
doc.adjectives()
doc.adjectives().json()
doc.adverbs()
doc.adverbs().json()
// ### Nouns
doc.nouns()
doc.nouns().parse()
doc.nouns().json()
doc.nouns().isPlural()
doc.nouns().adjectives()
doc.nouns().toPlural()
doc.nouns().toSingular()
// ### Numbers
doc.numbers()
doc.numbers().parse()
doc.numbers().get()
doc.numbers().json()
doc.numbers().isOrdinal()
doc.numbers().isCardinal()
doc.numbers().isUnit('km')
doc.numbers().toNumber()
doc.numbers().toLocaleString()
doc.numbers().toText()
doc.numbers().toCardinal()
doc.numbers().toOrdinal()
doc.numbers().isEqual()
doc.numbers().greaterThan(2)
doc.numbers().lessThan(2)
doc.numbers().between(2, 3)
doc.numbers().set(2)
doc.numbers().add(2)
doc.numbers().subtract(2)
doc.numbers().increment()
doc.numbers().decrement()
doc.percentages()
doc.money()
doc.fractions()
doc.fractions().parse()
doc.fractions().get()
doc.fractions().json()
doc.fractions().toDecimal()
doc.fractions().toFraction()
doc.fractions().toOrdinal()
doc.fractions().toCardinal()
doc.fractions().toPercentage()
// ### Sentences
doc.sentences()
doc.sentences().json()
doc.sentences().toPastTense()
doc.sentences().toPresentTense()
doc.sentences().toFutureTense()
doc.sentences().toInfinitive()
doc.sentences().toNegative()
doc.sentences().toPositive()
doc.sentences().isQuestion()
doc.sentences().isExclamation()
doc.sentences().isStatement()
doc.questions()
// ### Verbs
doc.verbs()
doc.verbs().parse()
doc.verbs().json()
doc.verbs().subjects()
doc.verbs().adverbs()
doc.verbs().isSingular()
doc.verbs().isPlural()
doc.verbs().isImperative()
doc.verbs().toInfinitive()
doc.verbs().toPresentTense()
doc.verbs().toPastTense()
doc.verbs().toFutureTense()
doc.verbs().toGerund()
doc.verbs().conjugate()
doc.verbs().isNegative()
doc.verbs().isPositive()
doc.verbs().toPositive()
doc.verbs().toNegative()
// ### Topics
doc.people()
doc.people().parse()
doc.people().json()
doc.places()
doc.organizations()
doc.topics()
+23
View File
@@ -0,0 +1,23 @@
// import nlp from '../../src/three.js'
import nlp from '../../types/two'
const doc = nlp('okay cool')
// ### Pre-tagger
doc.compute('preTagger')
doc.compute('root')
doc.compute('penn')
// ### Contraction-two
doc.compute('contractionTwo')
doc.contractions()
doc.contractions().expand()
doc.contract()
// ### Post-tagger
doc.compute('postTagger')
doc.confidence()
// ### Swap
doc.swap('', '')