-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtoo-wordy.js
248 lines (245 loc) · 4.45 KB
/
too-wordy.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
const matcher = require('./matcher');
let wordyWords = [
'a number of',
'abundance',
'accede to',
'accelerate',
'accentuate',
'accompany',
'accomplish',
'accorded',
'accrue',
'acquiesce',
'acquire',
'additional',
'adjacent to',
'adjustment',
'admissible',
'advantageous',
'adversely impact',
'advise',
'aforementioned',
'aggregate',
'aircraft',
'all of',
'all things considered',
'alleviate',
'allocate',
'along the lines of',
'already existing',
'alternatively',
'amazing',
'ameliorate',
'anticipate',
'apparent',
'appreciable',
'as a matter of fact',
'as a means of',
'as far as I\'m concerned',
'as of yet',
'as per',
'as to',
'as yet',
'ascertain',
'assistance',
'at the present time',
'at this time',
'attain',
'attributable to',
'authorize',
'because of the fact that',
'belated',
'benefit from',
'bestow',
'by means of',
'by virtue of the fact that',
'by virtue of',
'cease',
'close proximity',
'commence',
'comply with',
'concerning',
'consequently',
'consolidate',
'constitutes',
'demonstrate',
'depart',
'designate',
'discontinue',
'do damage to',
'do harm to',
'due to the fact that',
'during the course of',
'each and every',
'economical',
'eliminate',
'elucidate',
'employ',
'endeavor',
'enumerate',
'equitable',
'equivalent',
'evaluate',
'evidenced',
'exclusively',
'expedite',
'expend',
'expiration',
'facilitate',
'factual evidence',
'feasible',
'finalize',
'first and foremost',
'for all intents and purposes',
'for the duration of',
'for the most part',
'for the purpose of',
'forfeit',
'formulate',
'have a tendency to',
'honest truth',
'however',
'if and when',
'impacted',
'implement',
'in a manner of speaking',
'in a timely manner',
'in a very real sense',
'in accordance with',
'in addition',
'in all likelihood',
'in an effort to',
'in between',
'in excess of',
'in lieu of',
'in light of the fact that',
'in many cases',
'in my opinion',
'in need of',
'in order to',
'in regard to',
'in some instances',
'in terms of',
'in the affirmative',
'in the case of',
'in the course of',
'in the event that',
'in the final analysis',
'in the midst of',
'in the nature of',
'in the near future',
'in the negative',
'in the process of',
'inception',
'incumbent upon',
'indicate',
'indication',
'initiate',
'irregardless',
'is applicable to',
'is authorized to',
'is responsible for',
'it is essential',
'it is',
'it seems that',
'it was',
'magnitude',
'majority of',
'make an effort',
'maximum',
'methodology',
'minimize',
'minimum',
'modify',
'monitor',
'multiple',
'myriad of',
'necessitate',
'nevertheless',
'not certain',
'not many',
'not often',
'not unless',
'not unlike',
'notwithstanding',
'null and void',
'numerous',
'objective',
'obligate',
'obtain',
'of late',
'of the fact that',
'off of',
'on the contrary',
'on the other hand',
'one particular',
'optimum',
'outside of',
'overall',
'owing to the fact that',
'participate',
'particulars',
'pass away',
'pertaining to',
'point in time',
'portion',
'possess',
'preclude',
'previous to',
'previously',
'prior to',
'prioritize',
'procure',
'proficiency',
'provided that',
'purchase',
'put simply',
'readily apparent',
'refer back',
'regarding',
'relocate',
'remainder',
'remuneration',
'requirement',
'reside',
'residence',
'retain',
'satisfy',
'shall',
'should you wish',
'similar to',
'solicit',
'sooner rather than later',
'span across',
'strategize',
'subsequent',
'substantial',
'successfully complete',
'sufficient',
'terminate',
'that which',
'the month of',
'the point I am trying to make',
'therefore',
'time period',
'took advantage of',
'transmit',
'transpire',
'type of',
'until such time as',
'utilization',
'utilize',
'validate',
'various different',
'what I mean to say is',
'whether or not',
'with respect to',
'with the exception of',
'witnessed'
];
// Replace a basic white-space with more-robust white-space matching for new lines, half-space etc.
wordyWords = wordyWords.map((w) => w.replace(/ /g, '[\\b\\s\\u200C]*'));
const wordyRegex = new RegExp(`\\b(?<!-)(${wordyWords.join('|')})\\b`, 'gi');
module.exports = function isTextWordy(text) {
return matcher(wordyRegex, text);
};