diff --git a/docs-toc.yml b/docs-toc.yml index 9cacfb2..aa5da89 100644 --- a/docs-toc.yml +++ b/docs-toc.yml @@ -26,6 +26,8 @@ toc: - string.trim - string.upperCase - name: tokens + - tokens.appendBigrams + - tokens.bigrams - tokens.bow - tokens.phonetize - tokens.propagateNegations diff --git a/docs/index.html b/docs/index.html index 1402c88..f71d352 100644 --- a/docs/index.html +++ b/docs/index.html @@ -294,6 +294,26 @@
Generates bigrams from the input tokens and appends them to the input tokens.
+ + +Array<string>
:
+ the input tokens appended with their bigrams.
+
+
+
+
+
+
+
+
+ appendBigrams( [ 'he', 'acted', 'decisively', 'today' ] );
+// -> [ 'he',
+// 'acted',
+// 'decisively',
+// 'today',
+// 'he_acted',
+// 'acted_decisively',
+// 'decisively_today' ]
+
+
+
+
+
+
+
+
+Generates bigrams from the input tokens.
+ + +Array<string>
:
+ the bigrams.
+
+
+
+
+
+
+
+
+ bigrams( [ 'he', 'acted', 'decisively', 'today' ] );
+// -> [ [ 'he', 'acted' ],
+// [ 'acted', 'decisively' ],
+// [ 'decisively', 'today' ] ]
+
+
+
+
+
+
+
+
+string
:
+ Array<string>
:
phonetized tokens.
@@ -3083,7 +3263,7 @@ string
:
+ Array<string>
:
soundex coded tokens.
@@ -3273,7 +3453,7 @@ string
:
+ Array<string>
:
stemmed tokens.
diff --git a/src/tokens-append-bigrams.js b/src/tokens-append-bigrams.js
new file mode 100644
index 0000000..9d716ef
--- /dev/null
+++ b/src/tokens-append-bigrams.js
@@ -0,0 +1,54 @@
+// wink-nlp-utils
+// NLP Functions for removing HTML Tags, Managing Elisions,
+// NGrams, appendBigramsming, Phoneticising to Tokenizating and more.
+//
+// Copyright (C) 2017 GRAYPE SyappendBigramss Private Limited
+//
+// This file is part of “wink-nlp-utils”.
+//
+// “wink-nlp-utils” is free software: you can redistribute it
+// and/or modify it under the terms of the GNU Affero
+// General Public License as published by the Free
+// Software Foundation, version 3 of the License.
+//
+// “wink-nlp-utils” is distributed in the hope that it will
+// be useful, but WITHOUT ANY WARRANTY; without even
+// the implied warranty of MERCHANTABILITY or FITNESS
+// FOR A PARTICULAR PURPOSE. See the GNU Affero General
+// Public License for more details.
+//
+// You should have received a copy of the GNU Affero
+// General Public License along with “wink-nlp-utils”.
+// If not, see