Skip to content

Commit 7a30d35

Browse files
author
Frank M. Taylor
committed
corrects formatting. Adds missing descriptions
1 parent 31fc5cc commit 7a30d35

File tree

1 file changed

+52
-21
lines changed

1 file changed

+52
-21
lines changed

README.md

Lines changed: 52 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Global Class
3131
**Parameters**
3232
| name | type | Description |
3333
| --- |--- | --- |
34-
| string | text | raw text to be analyzed |
34+
| text | string | raw text to be analyzed |
3535

3636
### Static Members
3737
#### `Punctuations`
@@ -50,6 +50,7 @@ em-dash, period, comma, semicolon, colon, bang, question mark, interrobang, Span
5050
### Static Methods
5151
#### `hasPunctuation(string)`
5252
determines if string contains punctuation
53+
5354
**Parameters**
5455
| name | type | Description |
5556
| --- |--- | --- |
@@ -60,6 +61,7 @@ em-dash, period, comma, semicolon, colon, bang, question mark, interrobang, Span
6061

6162
#### `hasSpace(string)`
6263
determines if a string has a space
64+
6365
**Parameters**
6466
| name | type | Description |
6567
| --- |--- | --- |
@@ -92,6 +94,7 @@ em-dash, period, comma, semicolon, colon, bang, question mark, interrobang, Span
9294

9395
#### `getNGrams(text, gramSize)`
9496
gets ngrams from text
97+
9598
**Parameters**
9699
| name | type | Description |
97100
| --- |--- | --- |
@@ -103,8 +106,10 @@ em-dash, period, comma, semicolon, colon, bang, question mark, interrobang, Span
103106

104107

105108
#### `getWordNGrams(text)`
106-
Gets 2-word pairs from text.
107-
This doesn't use sentence punctuation as a boundary. Should it?
109+
Gets 2-word pairs from text.
110+
111+
Note: This doesn't use sentence punctuation as a boundary. Should it?
112+
108113
**Parameters**
109114
| name | type | Description |
110115
| --- |--- | --- |
@@ -115,6 +120,8 @@ Gets 2-word pairs from text.
115120
`Array<string>`
116121

117122
#### `getFrequencyMap(frequencyMap)`
123+
converts an array of strings into a map of those strings and number of occurences
124+
118125
**Parameters**
119126
| name | type | Description |
120127
| --- |--- | --- |
@@ -124,6 +131,8 @@ Gets 2-word pairs from text.
124131
`Map<string, number>`
125132

126133
#### `getPercentMap(frequencyMap)`
134+
converts a frequency map into a map of percentages
135+
127136
**Parameters**
128137
| name | type | Description |
129138
| --- |--- | --- |
@@ -133,7 +142,8 @@ Gets 2-word pairs from text.
133142
`Map<string, number>`
134143

135144
#### `getTopGrams(frequencyMap)`
136-
145+
filters a frequency map into only a small subset of the most frequent ones
146+
137147
**Parameters**
138148
| name | type | Description |
139149
| --- |--- | --- |
@@ -145,61 +155,79 @@ Gets 2-word pairs from text.
145155

146156
### Instance Members
147157
#### `sanitizedText`
148-
lowercased text with diacritics removed
158+
lowercased text with diacritics removed
159+
149160
`string`
150161
#### `letters`
151-
an array of letters in the text
162+
an array of letters in the text
163+
152164
`Array<string>`
153165
#### `words`
154166
an array of words in the text
167+
155168
`Array<string>`
156169
#### `bigrams`
157-
an array of letter bigrams in the text
170+
an array of letter bigrams in the text
171+
158172
`Array<string>`
159173
#### `trigrams`
160-
an array of letter trigrams in the text
174+
an array of letter trigrams in the text
175+
161176
`Array<string>`
162177
#### `uniqueLetters`
163-
an array of unique letters in the text
178+
an array of unique letters in the text
179+
164180
`Array<string>`
165181
#### `uniqueBigrams`
166182
an array of unique bigrams in the text
183+
167184
`Array<string>`
168185
#### `uniqueTrigrams`
169186
an array of unique trigrams in the text
187+
170188
`Array<string>`
171189
#### `uniqueWords`
172190
an array of unique words in the text
191+
173192
`Array<string>`
174193
#### `letterFrequencies`
175-
a map of letter frequencies in the sanitized text
194+
a map of letter frequencies in the sanitized text
195+
176196
`Map<string, number>`
177197
#### `bigramFrequencies`
178-
a map of bigram frequencies in the sanitized text
198+
a map of bigram frequencies in the sanitized text
199+
179200
`Map<string, number>`
180201
#### `trigramFrequencies`
181-
a map of trigram frequencies in the sanitized text
202+
a map of trigram frequencies in the sanitized text
203+
182204
`Map<string, number>`
183205
#### `wordFrequencies`
184-
a map of word frequencies in the sanitized text
206+
a map of word frequencies in the sanitized text
207+
185208
`Map<string, number>`
186209
#### `letterPercentages`
187-
a map of letter percentages in the sanitized text
210+
a map of letter percentages in the sanitized text
211+
188212
`Map<string, number>`
189213
#### `bigramPercentages`
190-
a map of bigram percentages in the sanitized text
214+
a map of bigram percentages in the sanitized text
215+
191216
`Map<string, number>`
192217
#### `trigramPercentages`
193-
a map of trigram percentages in the sanitized text
218+
a map of trigram percentages in the sanitized text
219+
194220
`Map<string, number>`
195221
#### `wordPercentages`
196-
a map of word percentages in the sanitized text
222+
a map of word percentages in the sanitized text
223+
197224
`Map<string, number>`
198225

199226
### Instance Methods
200227

201228
#### `getTopLetters(topCount)`
202-
a map of the most used letters in the text
229+
a map of the most used letters in the text
230+
203231
**Parameters**
204232
| name | type | Description |
205233
| --- |--- | --- |
@@ -209,7 +237,8 @@ lowercased text with diacritics removed
209237
`Map<string, number>`
210238

211239
#### `getTopBigrams(topCount)`
212-
a map of the most used bigrams in the text
240+
a map of the most used bigrams in the text
241+
213242
**Parameters**
214243
| name | type | Description |
215244
| --- |--- | --- |
@@ -219,7 +248,8 @@ lowercased text with diacritics removed
219248
`Map<string, number>`
220249

221250
#### `getTopTrigrams(topCount)`
222-
a map of the most used trigrams in the text
251+
a map of the most used trigrams in the text
252+
223253
**Parameters**
224254
| name | type | Description |
225255
| --- |--- | --- |
@@ -229,7 +259,8 @@ lowercased text with diacritics removed
229259
`Map<string, number>`
230260

231261
#### `getTopWords(topCount)`
232-
a map of the most used words in the text
262+
a map of the most used words in the text
263+
233264
**Parameters**
234265
| name | type | Description |
235266
| --- |--- | --- |

0 commit comments

Comments
 (0)