forked from spencermountain/compromise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
51 lines (43 loc) · 1.34 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// if we're server-side, grab files, otherwise assume they're prepended already
if (typeof module !== "undefined" && module.exports) {
var parents = require("./src/parents/parents")
var sentence_parser = require('./src/methods/tokenization/sentence').sentences;
var tokenize = require('./src/methods/tokenization/tokenize').tokenize;
var ngram = require('./src/methods/tokenization/ngram').ngram;
//tokenize
var normalize = require('./src/methods/transliteration/unicode_normalisation')
var syllables = require('./src/methods/syllables/syllable');
//localization
var l = require('./src/methods/localization/britishize')
var americanize = l.americanize;
var britishize = l.britishize;
//part of speech tagging
var pos = require('./src/pos');
//named_entity_recognition
var spot = require('./src/spot');
}
///
//footer
//
var nlp = {
noun: parents.noun,
adjective: parents.adjective,
verb: parents.verb,
adverb: parents.adverb,
value: parents.value,
sentences: sentence_parser,
ngram: ngram,
tokenize: tokenize,
americanize: americanize,
britishize: britishize,
syllables: syllables,
normalize: normalize.normalize,
denormalize: normalize.denormalize,
pos: pos,
spot: spot,
// tests: tests,
}
//export it for server-side
if (typeof module !== "undefined" && module.exports) {
module.exports = nlp
}