nlp-text-preprocessing 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nlp_text_preprocessing-0.0.1/LICENSE +21 -0
- nlp_text_preprocessing-0.0.1/MANIFEST.in +1 -0
- nlp_text_preprocessing-0.0.1/PKG-INFO +237 -0
- nlp_text_preprocessing-0.0.1/nlp_text_preprocessing.egg-info/PKG-INFO +237 -0
- nlp_text_preprocessing-0.0.1/nlp_text_preprocessing.egg-info/SOURCES.txt +10 -0
- nlp_text_preprocessing-0.0.1/nlp_text_preprocessing.egg-info/dependency_links.txt +1 -0
- nlp_text_preprocessing-0.0.1/nlp_text_preprocessing.egg-info/top_level.txt +1 -0
- nlp_text_preprocessing-0.0.1/setup.cfg +4 -0
- nlp_text_preprocessing-0.0.1/setup.py +27 -0
- nlp_text_preprocessing-0.0.1/text_preprocessing/__init__.py +32 -0
- nlp_text_preprocessing-0.0.1/text_preprocessing/all_text_preprocess.py +183 -0
- nlp_text_preprocessing-0.0.1/text_preprocessing/data/contractions.json +310 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Uditya Narayan Tiwari
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include text_preprocessing/data/contractions.json
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nlp_text_preprocessing
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: This is a Text Processing Package For NLP
|
|
5
|
+
Author: Uditya Narayan Tiwari
|
|
6
|
+
Author-email: tiwarimerit@gmail.com
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: author
|
|
14
|
+
Dynamic: author-email
|
|
15
|
+
Dynamic: classifier
|
|
16
|
+
Dynamic: description
|
|
17
|
+
Dynamic: description-content-type
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
Dynamic: requires-python
|
|
20
|
+
Dynamic: summary
|
|
21
|
+
|
|
22
|
+
# Text Preprocessing Python Package
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
#### Course Link: [Introduction to NLP](https://bit.ly/intro_nlp)
|
|
26
|
+
|
|
27
|
+
This Python package is created by [Uditya Narayan Tiwari](https://youtube.com/kgptalkie). It provides various text preprocessing utilities for natural language processing (NLP) tasks.
|
|
28
|
+
|
|
29
|
+
### Installation from PyPi
|
|
30
|
+
You can install this package using pip as follows:
|
|
31
|
+
```
|
|
32
|
+
pip install text_preprocessing
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Installation from GitHub
|
|
36
|
+
You can install this package from GitHub as follows:
|
|
37
|
+
```
|
|
38
|
+
pip install git+https://github.com/udityamerit/Text-Processing-Package-For-Natural-Language-Processing.git --upgrade --force-reinstall
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Uninstall the Package
|
|
42
|
+
|
|
43
|
+
To uninstall the package, use the following command:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip uninstall text_preprocessing
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Requirements
|
|
50
|
+
You need to install these python packages.
|
|
51
|
+
```
|
|
52
|
+
python -m spacy download en_core_web_sm
|
|
53
|
+
spacy
|
|
54
|
+
textblob
|
|
55
|
+
beautifulsoup4
|
|
56
|
+
nltk
|
|
57
|
+
openpyxl
|
|
58
|
+
SpeechRecognition==3.10.4
|
|
59
|
+
pyaudio==0.2.14
|
|
60
|
+
PrettyTable
|
|
61
|
+
scikit-learn
|
|
62
|
+
wordcloud
|
|
63
|
+
lxml
|
|
64
|
+
pandas
|
|
65
|
+
numpy
|
|
66
|
+
matplotlib
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## How to Use the Package
|
|
71
|
+
|
|
72
|
+
### 1. Basic Text Preprocessing
|
|
73
|
+
|
|
74
|
+
#### Lowercasing Text
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
import text_preprocessing as tp
|
|
78
|
+
|
|
79
|
+
text = "HELLO WORLD!"
|
|
80
|
+
processed_text = tp.to_lower_case(text)
|
|
81
|
+
print(processed_text) # Output: hello world!
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### Expanding Contractions
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
import text_preprocessing as tp
|
|
88
|
+
|
|
89
|
+
text = "I'm learning NLP."
|
|
90
|
+
processed_text = tp.contraction_to_expansion(text)
|
|
91
|
+
print(processed_text) # Output: I am learning NLP.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Removing Emails
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
import text_preprocessing as tp
|
|
98
|
+
|
|
99
|
+
text = "Contact me at example@example.com"
|
|
100
|
+
processed_text = tp.remove_emails(text)
|
|
101
|
+
print(processed_text) # Output: Contact me at
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
#### Removing URLs
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
import text_preprocessing as tp
|
|
108
|
+
|
|
109
|
+
text = "Check out https://example.com"
|
|
110
|
+
processed_text = tp.remove_urls(text)
|
|
111
|
+
print(processed_text) # Output: Check out
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
#### Removing HTML Tags
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
import text_preprocessing as tp
|
|
118
|
+
|
|
119
|
+
text = "<p>Hello World!</p>"
|
|
120
|
+
processed_text = tp.remove_html_tags(text)
|
|
121
|
+
print(processed_text) # Output: Hello World!
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
#### Removing Special Characters
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
import text_preprocessing as tp
|
|
128
|
+
|
|
129
|
+
text = "Hello @World! #NLP"
|
|
130
|
+
processed_text = tp.remove_special_chars(text)
|
|
131
|
+
print(processed_text) # Output: Hello World NLP
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 2. Advanced Text Processing
|
|
135
|
+
|
|
136
|
+
#### Lemmatization
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
import text_preprocessing as tp
|
|
140
|
+
|
|
141
|
+
text = "running runs"
|
|
142
|
+
processed_text = tp.lemmatize(text)
|
|
143
|
+
print(processed_text) # Output: run run
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### Sentiment Analysis
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
import text_preprocessing as tp
|
|
150
|
+
|
|
151
|
+
text = "I love programming!"
|
|
152
|
+
sentiment = tp.sentiment_analysis(text)
|
|
153
|
+
print(sentiment) # Output: Sentiment(polarity=0.5, subjectivity=0.6)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
#### Detecting and Translating Language
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
import text_preprocessing as tp
|
|
160
|
+
from googletrans import Translator
|
|
161
|
+
|
|
162
|
+
translator = Translator()
|
|
163
|
+
text = "Bonjour tout le monde"
|
|
164
|
+
lang = tp.detect_language(text, translator)
|
|
165
|
+
translated_text = tp.translate(text, 'en', translator)
|
|
166
|
+
print(f"Language: {lang}, Translated: {translated_text}")
|
|
167
|
+
# Output: Language: fr, Translated: Hello everyone
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### 3. Feature Extraction
|
|
171
|
+
|
|
172
|
+
#### Word Count
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
import text_preprocessing as tp
|
|
176
|
+
|
|
177
|
+
text = "I love NLP."
|
|
178
|
+
count = tp.word_count(text)
|
|
179
|
+
print(count) # Output: 3
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
#### Character Count
|
|
183
|
+
|
|
184
|
+
```python
|
|
185
|
+
import text_preprocessing as tp
|
|
186
|
+
|
|
187
|
+
text = "I love NLP."
|
|
188
|
+
count = tp.char_count(text)
|
|
189
|
+
print(count) # Output: 9
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### N-Grams
|
|
193
|
+
|
|
194
|
+
```python
|
|
195
|
+
import text_preprocessing as tp
|
|
196
|
+
|
|
197
|
+
text = "I love NLP"
|
|
198
|
+
ngrams = tp.n_grams(text, n=2)
|
|
199
|
+
print(ngrams) # Output: [('I', 'love'), ('love', 'NLP')]
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### 4. Full Example: Cleaning Text
|
|
203
|
+
|
|
204
|
+
Here’s an example of how you might use several functions together to clean text data:
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
import text_preprocessing as tp
|
|
208
|
+
|
|
209
|
+
text = "I'm loving this NLP tutorial! Contact me at https://www.linkedin.com/in/uditya-narayan-tiwari-562332289/ Visit https://udityanarayantiwari.netlify.app/"
|
|
210
|
+
cleaned_text = tp.clean_text(text)
|
|
211
|
+
print(cleaned_text)
|
|
212
|
+
# Output: i am loving this nlp tutorial contact me at visit
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### One Short Feature Extraction
|
|
216
|
+
```python
|
|
217
|
+
import text_preprocessing as tp
|
|
218
|
+
|
|
219
|
+
tp.extract_features("I love NLP")
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Notes
|
|
223
|
+
|
|
224
|
+
- Be cautious when using heavy operations like `lemmatize` and `spelling_correction` on very large datasets, as they can be time-consuming.
|
|
225
|
+
- The package supports custom cleaning and preprocessing pipelines by using these modular functions together.
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nlp_text_preprocessing
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: This is a Text Processing Package For NLP
|
|
5
|
+
Author: Uditya Narayan Tiwari
|
|
6
|
+
Author-email: tiwarimerit@gmail.com
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: author
|
|
14
|
+
Dynamic: author-email
|
|
15
|
+
Dynamic: classifier
|
|
16
|
+
Dynamic: description
|
|
17
|
+
Dynamic: description-content-type
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
Dynamic: requires-python
|
|
20
|
+
Dynamic: summary
|
|
21
|
+
|
|
22
|
+
# Text Preprocessing Python Package
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
#### Course Link: [Introduction to NLP](https://bit.ly/intro_nlp)
|
|
26
|
+
|
|
27
|
+
This Python package is created by [Uditya Narayan Tiwari](https://youtube.com/kgptalkie). It provides various text preprocessing utilities for natural language processing (NLP) tasks.
|
|
28
|
+
|
|
29
|
+
### Installation from PyPi
|
|
30
|
+
You can install this package using pip as follows:
|
|
31
|
+
```
|
|
32
|
+
pip install text_preprocessing
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Installation from GitHub
|
|
36
|
+
You can install this package from GitHub as follows:
|
|
37
|
+
```
|
|
38
|
+
pip install git+https://github.com/udityamerit/Text-Processing-Package-For-Natural-Language-Processing.git --upgrade --force-reinstall
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Uninstall the Package
|
|
42
|
+
|
|
43
|
+
To uninstall the package, use the following command:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip uninstall text_preprocessing
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Requirements
|
|
50
|
+
You need to install these python packages.
|
|
51
|
+
```
|
|
52
|
+
python -m spacy download en_core_web_sm
|
|
53
|
+
spacy
|
|
54
|
+
textblob
|
|
55
|
+
beautifulsoup4
|
|
56
|
+
nltk
|
|
57
|
+
openpyxl
|
|
58
|
+
SpeechRecognition==3.10.4
|
|
59
|
+
pyaudio==0.2.14
|
|
60
|
+
PrettyTable
|
|
61
|
+
scikit-learn
|
|
62
|
+
wordcloud
|
|
63
|
+
lxml
|
|
64
|
+
pandas
|
|
65
|
+
numpy
|
|
66
|
+
matplotlib
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## How to Use the Package
|
|
71
|
+
|
|
72
|
+
### 1. Basic Text Preprocessing
|
|
73
|
+
|
|
74
|
+
#### Lowercasing Text
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
import text_preprocessing as tp
|
|
78
|
+
|
|
79
|
+
text = "HELLO WORLD!"
|
|
80
|
+
processed_text = tp.to_lower_case(text)
|
|
81
|
+
print(processed_text) # Output: hello world!
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### Expanding Contractions
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
import text_preprocessing as tp
|
|
88
|
+
|
|
89
|
+
text = "I'm learning NLP."
|
|
90
|
+
processed_text = tp.contraction_to_expansion(text)
|
|
91
|
+
print(processed_text) # Output: I am learning NLP.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Removing Emails
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
import text_preprocessing as tp
|
|
98
|
+
|
|
99
|
+
text = "Contact me at example@example.com"
|
|
100
|
+
processed_text = tp.remove_emails(text)
|
|
101
|
+
print(processed_text) # Output: Contact me at
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
#### Removing URLs
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
import text_preprocessing as tp
|
|
108
|
+
|
|
109
|
+
text = "Check out https://example.com"
|
|
110
|
+
processed_text = tp.remove_urls(text)
|
|
111
|
+
print(processed_text) # Output: Check out
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
#### Removing HTML Tags
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
import text_preprocessing as tp
|
|
118
|
+
|
|
119
|
+
text = "<p>Hello World!</p>"
|
|
120
|
+
processed_text = tp.remove_html_tags(text)
|
|
121
|
+
print(processed_text) # Output: Hello World!
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
#### Removing Special Characters
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
import text_preprocessing as tp
|
|
128
|
+
|
|
129
|
+
text = "Hello @World! #NLP"
|
|
130
|
+
processed_text = tp.remove_special_chars(text)
|
|
131
|
+
print(processed_text) # Output: Hello World NLP
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 2. Advanced Text Processing
|
|
135
|
+
|
|
136
|
+
#### Lemmatization
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
import text_preprocessing as tp
|
|
140
|
+
|
|
141
|
+
text = "running runs"
|
|
142
|
+
processed_text = tp.lemmatize(text)
|
|
143
|
+
print(processed_text) # Output: run run
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### Sentiment Analysis
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
import text_preprocessing as tp
|
|
150
|
+
|
|
151
|
+
text = "I love programming!"
|
|
152
|
+
sentiment = tp.sentiment_analysis(text)
|
|
153
|
+
print(sentiment) # Output: Sentiment(polarity=0.5, subjectivity=0.6)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
#### Detecting and Translating Language
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
import text_preprocessing as tp
|
|
160
|
+
from googletrans import Translator
|
|
161
|
+
|
|
162
|
+
translator = Translator()
|
|
163
|
+
text = "Bonjour tout le monde"
|
|
164
|
+
lang = tp.detect_language(text, translator)
|
|
165
|
+
translated_text = tp.translate(text, 'en', translator)
|
|
166
|
+
print(f"Language: {lang}, Translated: {translated_text}")
|
|
167
|
+
# Output: Language: fr, Translated: Hello everyone
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### 3. Feature Extraction
|
|
171
|
+
|
|
172
|
+
#### Word Count
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
import text_preprocessing as tp
|
|
176
|
+
|
|
177
|
+
text = "I love NLP."
|
|
178
|
+
count = tp.word_count(text)
|
|
179
|
+
print(count) # Output: 3
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
#### Character Count
|
|
183
|
+
|
|
184
|
+
```python
|
|
185
|
+
import text_preprocessing as tp
|
|
186
|
+
|
|
187
|
+
text = "I love NLP."
|
|
188
|
+
count = tp.char_count(text)
|
|
189
|
+
print(count) # Output: 9
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### N-Grams
|
|
193
|
+
|
|
194
|
+
```python
|
|
195
|
+
import text_preprocessing as tp
|
|
196
|
+
|
|
197
|
+
text = "I love NLP"
|
|
198
|
+
ngrams = tp.n_grams(text, n=2)
|
|
199
|
+
print(ngrams) # Output: [('I', 'love'), ('love', 'NLP')]
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### 4. Full Example: Cleaning Text
|
|
203
|
+
|
|
204
|
+
Here’s an example of how you might use several functions together to clean text data:
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
import text_preprocessing as tp
|
|
208
|
+
|
|
209
|
+
text = "I'm loving this NLP tutorial! Contact me at https://www.linkedin.com/in/uditya-narayan-tiwari-562332289/ Visit https://udityanarayantiwari.netlify.app/"
|
|
210
|
+
cleaned_text = tp.clean_text(text)
|
|
211
|
+
print(cleaned_text)
|
|
212
|
+
# Output: i am loving this nlp tutorial contact me at visit
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### One Short Feature Extraction
|
|
216
|
+
```python
|
|
217
|
+
import text_preprocessing as tp
|
|
218
|
+
|
|
219
|
+
tp.extract_features("I love NLP")
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Notes
|
|
223
|
+
|
|
224
|
+
- Be cautious when using heavy operations like `lemmatize` and `spelling_correction` on very large datasets, as they can be time-consuming.
|
|
225
|
+
- The package supports custom cleaning and preprocessing pipelines by using these modular functions together.
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
setup.py
|
|
4
|
+
nlp_text_preprocessing.egg-info/PKG-INFO
|
|
5
|
+
nlp_text_preprocessing.egg-info/SOURCES.txt
|
|
6
|
+
nlp_text_preprocessing.egg-info/dependency_links.txt
|
|
7
|
+
nlp_text_preprocessing.egg-info/top_level.txt
|
|
8
|
+
text_preprocessing/__init__.py
|
|
9
|
+
text_preprocessing/all_text_preprocess.py
|
|
10
|
+
text_preprocessing/data/contractions.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
text_preprocessing
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import setuptools
|
|
2
|
+
|
|
3
|
+
with open('Readme.md') as fp:
|
|
4
|
+
long_description = fp.read()
|
|
5
|
+
|
|
6
|
+
# Use splitlines() to create a list of requirements
|
|
7
|
+
with open('requirements.txt') as fp:
|
|
8
|
+
requirements = fp.read().splitlines()
|
|
9
|
+
|
|
10
|
+
setuptools.setup(
|
|
11
|
+
name='nlp_text_preprocessing',
|
|
12
|
+
include_package_data=True,
|
|
13
|
+
version='0.0.1',
|
|
14
|
+
author='Uditya Narayan Tiwari',
|
|
15
|
+
author_email='tiwarimerit@gmail.com',
|
|
16
|
+
description='This is a Text Processing Package For NLP',
|
|
17
|
+
long_description=long_description,
|
|
18
|
+
long_description_content_type='text/markdown',
|
|
19
|
+
packages=setuptools.find_packages(),
|
|
20
|
+
classifiers=[
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"License :: OSI Approved :: MIT License",
|
|
23
|
+
"Operating System :: OS Independent"
|
|
24
|
+
],
|
|
25
|
+
|
|
26
|
+
python_requires='>=3.10',
|
|
27
|
+
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# entry level code and import text preprocess
|
|
2
|
+
|
|
3
|
+
from .all_text_preprocess import *
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# General Feature Extraction
|
|
7
|
+
def extract_features(x):
|
|
8
|
+
return {
|
|
9
|
+
'word_count': word_count(x),
|
|
10
|
+
'char_count': char_count(x),
|
|
11
|
+
'avg_word_len': avg_word_len(x),
|
|
12
|
+
'stop_words_count': stop_words_count(x),
|
|
13
|
+
'hashtags_count': hashtags_count(x),
|
|
14
|
+
'mentions_count': mentions_count(x),
|
|
15
|
+
'numerics_count': numerics_count(x),
|
|
16
|
+
'upper_case_count': upper_case_count(x),
|
|
17
|
+
'word_cloud': get_wordcloud(x),
|
|
18
|
+
'noun_phrases': get_noun_phrase(x),
|
|
19
|
+
'sentiment_analysis': sentiment_analysis(x)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
# Cleaning Text
|
|
23
|
+
def clean_text(text):
|
|
24
|
+
text = to_lower_case(text)
|
|
25
|
+
text = contraction_to_expansion(text)
|
|
26
|
+
text = remove_emails(text)
|
|
27
|
+
text = remove_urls(text)
|
|
28
|
+
text = remove_html_tag(text)
|
|
29
|
+
text = remove_special_chars(text)
|
|
30
|
+
text = lemmatize(text)
|
|
31
|
+
text = convert_to_base(text)
|
|
32
|
+
return text
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# All text preprocess code is here
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import json
|
|
5
|
+
import re
|
|
6
|
+
|
|
7
|
+
import spacy
|
|
8
|
+
import unicodedata
|
|
9
|
+
import matplotlib.pyplot as plt
|
|
10
|
+
from wordcloud import WordCloud
|
|
11
|
+
from bs4 import BeautifulSoup
|
|
12
|
+
from textblob import TextBlob
|
|
13
|
+
from textblob import Word
|
|
14
|
+
from textblob.sentiments import NaiveBayesAnalyzer
|
|
15
|
+
from spacy.lang.en.stop_words import STOP_WORDS as sw
|
|
16
|
+
import nltk
|
|
17
|
+
|
|
18
|
+
fpath = os.path.join(os.path.dirname(__file__), 'data/contractions.json')
|
|
19
|
+
contractions = json.load(open(fpath))
|
|
20
|
+
|
|
21
|
+
nlp = spacy.load('en_core_web_sm')
|
|
22
|
+
|
|
23
|
+
# List of NLTK packages and their corresponding resource paths for checking
|
|
24
|
+
nltk_packages = [
|
|
25
|
+
('punkt_tab', 'tokenizers/punkt_tab'),
|
|
26
|
+
('stopwords', 'corpora/stopwords'),
|
|
27
|
+
('averaged_perceptron_tagger', 'taggers/averaged_perceptron_tagger'),
|
|
28
|
+
('tagsets_json', 'help/tagsets_json'),
|
|
29
|
+
('wordnet', 'corpora/wordnet'),
|
|
30
|
+
('words', 'corpora/words'),
|
|
31
|
+
('maxent_ne_chunker_tab', 'chunkers/maxent_ne_chunker_tab'),
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
def download_nltk_packages():
|
|
35
|
+
"""
|
|
36
|
+
Downloads the required NLTK packages.
|
|
37
|
+
"""
|
|
38
|
+
for package, _ in nltk_packages:
|
|
39
|
+
nltk.download(package)
|
|
40
|
+
|
|
41
|
+
# Check if NLTK packages are present; if not, instruct the user to download them
|
|
42
|
+
missing_packages = []
|
|
43
|
+
for package, resource in nltk_packages:
|
|
44
|
+
try:
|
|
45
|
+
nltk.data.find(resource)
|
|
46
|
+
except LookupError:
|
|
47
|
+
missing_packages.append(package)
|
|
48
|
+
|
|
49
|
+
if missing_packages:
|
|
50
|
+
print(f"Warning: The following NLTK packages are missing: {', '.join(missing_packages)}")
|
|
51
|
+
print("Please run the 'download_nltk_packages()' function to download them.")
|
|
52
|
+
|
|
53
|
+
# General Feature Extraction
|
|
54
|
+
|
|
55
|
+
def word_count(x):
|
|
56
|
+
return len(x.split())
|
|
57
|
+
|
|
58
|
+
def char_count(x):
|
|
59
|
+
pattern = r'\s'
|
|
60
|
+
return len(re.sub(pattern, '', x))
|
|
61
|
+
|
|
62
|
+
def avg_word_len(x):
|
|
63
|
+
return char_count(x)/word_count(x)
|
|
64
|
+
|
|
65
|
+
def stop_words_count(x):
|
|
66
|
+
temp = len([word for word in x.lower().split() if word in sw])
|
|
67
|
+
return temp
|
|
68
|
+
|
|
69
|
+
def hashtags_count(x):
|
|
70
|
+
return len(re.findall(r'#\w+', x))
|
|
71
|
+
|
|
72
|
+
def mentions_count(x):
|
|
73
|
+
return len(re.findall(r'@\w+', x))
|
|
74
|
+
|
|
75
|
+
def numerics_count(x):
|
|
76
|
+
return len(re.findall(r'\b\d+\b', x))
|
|
77
|
+
|
|
78
|
+
def upper_case_count(x):
|
|
79
|
+
return len([word for word in x.split() if word.isupper()])
|
|
80
|
+
|
|
81
|
+
# Preprocessing and Cleaning
|
|
82
|
+
def to_lower_case(x):
|
|
83
|
+
return x.lower()
|
|
84
|
+
|
|
85
|
+
def contraction_to_expansion(x):
|
|
86
|
+
return " ".join([contractions.get(word.lower(), word) for word in x.split()])
|
|
87
|
+
|
|
88
|
+
def remove_emails(x):
|
|
89
|
+
pattern = r'\b[A-Za-z0-9._%+-]+@[A-Za-z.-]+\.[A-Z|a-z]{2,}\b'
|
|
90
|
+
return re.sub(pattern, '', x)
|
|
91
|
+
|
|
92
|
+
def count_emails(x):
|
|
93
|
+
pattern = r'\b[A-Za-z0-9._%+-]+@[A-Za-z.-]+\.[A-Z|a-z]{2,}\b'
|
|
94
|
+
return len(re.findall(pattern, '', x))
|
|
95
|
+
|
|
96
|
+
def count_urls(x):
|
|
97
|
+
pattern = r'http\S+|www\.\S+'
|
|
98
|
+
return len(re.findall(pattern, x))
|
|
99
|
+
|
|
100
|
+
def remove_urls(x):
|
|
101
|
+
pattern = r'http\S+|www\.\S+'
|
|
102
|
+
return re.sub(pattern, '', x)
|
|
103
|
+
|
|
104
|
+
def count_rt(x):
|
|
105
|
+
pattern = r'\bRT @\w+'
|
|
106
|
+
return len(re.findall(pattern, x))
|
|
107
|
+
|
|
108
|
+
def remove_rt(x):
|
|
109
|
+
pattern = r'\bRT @\w+'
|
|
110
|
+
return re.sub(pattern, '', x)
|
|
111
|
+
|
|
112
|
+
def remove_html_tag(x):
|
|
113
|
+
return BeautifulSoup(x, 'lxml').get_text()
|
|
114
|
+
|
|
115
|
+
def remove_accented_chars(x):
|
|
116
|
+
return unicodedata.normalize('NFKD', x).encode('ascii', 'ignore').decode('utf-8', 'ignore')
|
|
117
|
+
|
|
118
|
+
def remove_mentions(x):
|
|
119
|
+
pattern = r'@\w+'
|
|
120
|
+
return re.sub(pattern, "", x).strip()
|
|
121
|
+
|
|
122
|
+
def remove_special_chars(x):
|
|
123
|
+
pattern = r'[^\w\s]'
|
|
124
|
+
return re.sub(pattern,'',x)
|
|
125
|
+
|
|
126
|
+
def remove_repeated_chars(x):
|
|
127
|
+
pattern = r'(.)\1+'
|
|
128
|
+
return re.sub(pattern, r'\1\1', x)
|
|
129
|
+
|
|
130
|
+
def remove_stop_words(x):
|
|
131
|
+
return " ".join([word for word in x.split() if word not in sw])
|
|
132
|
+
|
|
133
|
+
def convert_to_base(x):
|
|
134
|
+
doc = nlp(x)
|
|
135
|
+
tokens = []
|
|
136
|
+
for token in doc:
|
|
137
|
+
if token.pos_ in ['NOUN', 'VERB']:
|
|
138
|
+
tokens.append(token.lemma_)
|
|
139
|
+
else:
|
|
140
|
+
tokens.append(token.text)
|
|
141
|
+
x = ' '.join(tokens)
|
|
142
|
+
pattern = r'\s\.'
|
|
143
|
+
x = re.sub(pattern, '.', x)
|
|
144
|
+
return x
|
|
145
|
+
|
|
146
|
+
def lemmatize(x):
|
|
147
|
+
doc = nlp(x)
|
|
148
|
+
return ' '.join([token.lemma_ for token in doc])
|
|
149
|
+
|
|
150
|
+
def get_wordcloud(x):
|
|
151
|
+
|
|
152
|
+
cloud = WordCloud(width=800, height=500).generate(x)
|
|
153
|
+
plt.figure(figsize=(15, 7), dpi=100)
|
|
154
|
+
plt.imshow(cloud.to_image(), interpolation='bilinear')
|
|
155
|
+
plt.axis('off')
|
|
156
|
+
plt.show()
|
|
157
|
+
|
|
158
|
+
def correct_spelling(x):
|
|
159
|
+
words = []
|
|
160
|
+
for word in x.split():
|
|
161
|
+
w = Word(word)
|
|
162
|
+
words.append(w.correct())
|
|
163
|
+
|
|
164
|
+
return ' '.join(words)
|
|
165
|
+
|
|
166
|
+
def get_noun_phrase(x):
|
|
167
|
+
blob = TextBlob(x)
|
|
168
|
+
noun_phrase = blob.noun_phrases
|
|
169
|
+
return noun_phrase
|
|
170
|
+
|
|
171
|
+
def n_grams(x, n=2):
|
|
172
|
+
return list(TextBlob(x).ngrams(n))
|
|
173
|
+
|
|
174
|
+
def singularize_words(x):
|
|
175
|
+
blob = TextBlob(x)
|
|
176
|
+
return ' '.join([word.singularize() if tag in ['NNS'] else word for word, tag in blob.tags])
|
|
177
|
+
|
|
178
|
+
def pluralize_words(x):
|
|
179
|
+
blob = TextBlob(x)
|
|
180
|
+
return ' '.join([word.singularize() if tag in ['NN'] else word for word, tag in blob.tags])
|
|
181
|
+
|
|
182
|
+
def sentiment_analysis(x):
|
|
183
|
+
return TextBlob(x, analyzer=NaiveBayesAnalyzer()).sentiment.classification
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
{
|
|
2
|
+
"€" : "euro",
|
|
3
|
+
"4ao" : "for adults only",
|
|
4
|
+
"a.m" : "before midday",
|
|
5
|
+
"a3" : "anytime anywhere anyplace",
|
|
6
|
+
"aamof" : "as a matter of fact",
|
|
7
|
+
"acct" : "account",
|
|
8
|
+
"adih" : "another day in hell",
|
|
9
|
+
"afaic" : "as far as i am concerned",
|
|
10
|
+
"afaict" : "as far as i can tell",
|
|
11
|
+
"afaik" : "as far as i know",
|
|
12
|
+
"afair" : "as far as i remember",
|
|
13
|
+
"afk" : "away from keyboard",
|
|
14
|
+
"app" : "application",
|
|
15
|
+
"approx" : "approximately",
|
|
16
|
+
"apps" : "applications",
|
|
17
|
+
"asap" : "as soon as possible",
|
|
18
|
+
"asl" : "age, sex, location",
|
|
19
|
+
"atk" : "at the keyboard",
|
|
20
|
+
"ave." : "avenue",
|
|
21
|
+
"aymm" : "are you my mother",
|
|
22
|
+
"ayor" : "at your own risk",
|
|
23
|
+
"b&b" : "bed and breakfast",
|
|
24
|
+
"b+b" : "bed and breakfast",
|
|
25
|
+
"b.c" : "before christ",
|
|
26
|
+
"b2b" : "business to business",
|
|
27
|
+
"b2c" : "business to customer",
|
|
28
|
+
"b4" : "before",
|
|
29
|
+
"b4n" : "bye for now",
|
|
30
|
+
"b@u" : "back at you",
|
|
31
|
+
"bae" : "before anyone else",
|
|
32
|
+
"bak" : "back at keyboard",
|
|
33
|
+
"bbbg" : "bye bye be good",
|
|
34
|
+
"bbc" : "british broadcasting corporation",
|
|
35
|
+
"bbias" : "be back in a second",
|
|
36
|
+
"bbl" : "be back later",
|
|
37
|
+
"bbs" : "be back soon",
|
|
38
|
+
"be4" : "before",
|
|
39
|
+
"bfn" : "bye for now",
|
|
40
|
+
"blvd" : "boulevard",
|
|
41
|
+
"bout" : "about",
|
|
42
|
+
"brb" : "be right back",
|
|
43
|
+
"bros" : "brothers",
|
|
44
|
+
"brt" : "be right there",
|
|
45
|
+
"bsaaw" : "big smile and a wink",
|
|
46
|
+
"btw" : "by the way",
|
|
47
|
+
"bwl" : "bursting with laughter",
|
|
48
|
+
"c/o" : "care of",
|
|
49
|
+
"cet" : "central european time",
|
|
50
|
+
"cf" : "compare",
|
|
51
|
+
"cia" : "central intelligence agency",
|
|
52
|
+
"csl" : "can not stop laughing",
|
|
53
|
+
"cu" : "see you",
|
|
54
|
+
"cul8r" : "see you later",
|
|
55
|
+
"cv" : "curriculum vitae",
|
|
56
|
+
"cwot" : "complete waste of time",
|
|
57
|
+
"cya" : "see you",
|
|
58
|
+
"cyt" : "see you tomorrow",
|
|
59
|
+
"dae" : "does anyone else",
|
|
60
|
+
"dbmib" : "do not bother me i am busy",
|
|
61
|
+
"diy" : "do it yourself",
|
|
62
|
+
"dm" : "direct message",
|
|
63
|
+
"dwh" : "during work hours",
|
|
64
|
+
"e123" : "easy as one two three",
|
|
65
|
+
"eet" : "eastern european time",
|
|
66
|
+
"eg" : "example",
|
|
67
|
+
"embm" : "early morning business meeting",
|
|
68
|
+
"encl" : "enclosed",
|
|
69
|
+
"encl." : "enclosed",
|
|
70
|
+
"etc" : "and so on",
|
|
71
|
+
"faq" : "frequently asked questions",
|
|
72
|
+
"fawc" : "for anyone who cares",
|
|
73
|
+
"fb" : "facebook",
|
|
74
|
+
"fc" : "fingers crossed",
|
|
75
|
+
"fig" : "figure",
|
|
76
|
+
"fimh" : "forever in my heart",
|
|
77
|
+
"ft." : "feet",
|
|
78
|
+
"ft" : "featuring",
|
|
79
|
+
"ftl" : "for the loss",
|
|
80
|
+
"ftw" : "for the win",
|
|
81
|
+
"fwiw" : "for what it is worth",
|
|
82
|
+
"fyi" : "for your information",
|
|
83
|
+
"g9" : "genius",
|
|
84
|
+
"gahoy" : "get a hold of yourself",
|
|
85
|
+
"gal" : "get a life",
|
|
86
|
+
"gcse" : "general certificate of secondary education",
|
|
87
|
+
"gfn" : "gone for now",
|
|
88
|
+
"gg" : "good game",
|
|
89
|
+
"gl" : "good luck",
|
|
90
|
+
"glhf" : "good luck have fun",
|
|
91
|
+
"gmt" : "greenwich mean time",
|
|
92
|
+
"gmta" : "great minds think alike",
|
|
93
|
+
"gn" : "good night",
|
|
94
|
+
"g.o.a.t" : "greatest of all time",
|
|
95
|
+
"goat" : "greatest of all time",
|
|
96
|
+
"goi" : "get over it",
|
|
97
|
+
"gps" : "global positioning system",
|
|
98
|
+
"gr8" : "great",
|
|
99
|
+
"gratz" : "congratulations",
|
|
100
|
+
"gyal" : "girl",
|
|
101
|
+
"h&c" : "hot and cold",
|
|
102
|
+
"hp" : "horsepower",
|
|
103
|
+
"hr" : "hour",
|
|
104
|
+
"hrh" : "his royal highness",
|
|
105
|
+
"ht" : "height",
|
|
106
|
+
"ibrb" : "i will be right back",
|
|
107
|
+
"ic" : "i see",
|
|
108
|
+
"icq" : "i seek you",
|
|
109
|
+
"icymi" : "in case you missed it",
|
|
110
|
+
"idc" : "i do not care",
|
|
111
|
+
"idgadf" : "i do not give a damn fuck",
|
|
112
|
+
"idgaf" : "i do not give a fuck",
|
|
113
|
+
"idk" : "i do not know",
|
|
114
|
+
"ie" : "that is",
|
|
115
|
+
"i.e" : "that is",
|
|
116
|
+
"ifyp" : "i feel your pain",
|
|
117
|
+
"IG" : "instagram",
|
|
118
|
+
"iirc" : "if i remember correctly",
|
|
119
|
+
"ilu" : "i love you",
|
|
120
|
+
"ily" : "i love you",
|
|
121
|
+
"imho" : "in my humble opinion",
|
|
122
|
+
"imo" : "in my opinion",
|
|
123
|
+
"imu" : "i miss you",
|
|
124
|
+
"iow" : "in other words",
|
|
125
|
+
"irl" : "in real life",
|
|
126
|
+
"j4f" : "just for fun",
|
|
127
|
+
"jic" : "just in case",
|
|
128
|
+
"jk" : "just kidding",
|
|
129
|
+
"jsyk" : "just so you know",
|
|
130
|
+
"l8r" : "later",
|
|
131
|
+
"lb" : "pound",
|
|
132
|
+
"lbs" : "pounds",
|
|
133
|
+
"ldr" : "long distance relationship",
|
|
134
|
+
"lmao" : "laugh my ass off",
|
|
135
|
+
"lmfao" : "laugh my fucking ass off",
|
|
136
|
+
"lol" : "laughing out loud",
|
|
137
|
+
"ltd" : "limited",
|
|
138
|
+
"ltns" : "long time no see",
|
|
139
|
+
"m8" : "mate",
|
|
140
|
+
"mf" : "motherfucker",
|
|
141
|
+
"mfs" : "motherfuckers",
|
|
142
|
+
"mfw" : "my face when",
|
|
143
|
+
"mofo" : "motherfucker",
|
|
144
|
+
"mph" : "miles per hour",
|
|
145
|
+
"mr" : "mister",
|
|
146
|
+
"mrw" : "my reaction when",
|
|
147
|
+
"ms" : "miss",
|
|
148
|
+
"mte" : "my thoughts exactly",
|
|
149
|
+
"nagi" : "not a good idea",
|
|
150
|
+
"nbc" : "national broadcasting company",
|
|
151
|
+
"nbd" : "not big deal",
|
|
152
|
+
"nfs" : "not for sale",
|
|
153
|
+
"ngl" : "not going to lie",
|
|
154
|
+
"nhs" : "national health service",
|
|
155
|
+
"nrn" : "no reply necessary",
|
|
156
|
+
"nsfl" : "not safe for life",
|
|
157
|
+
"nsfw" : "not safe for work",
|
|
158
|
+
"nth" : "nice to have",
|
|
159
|
+
"nvr" : "never",
|
|
160
|
+
"nyc" : "new york city",
|
|
161
|
+
"oc" : "original content",
|
|
162
|
+
"og" : "original",
|
|
163
|
+
"ohp" : "overhead projector",
|
|
164
|
+
"oic" : "oh i see",
|
|
165
|
+
"omdb" : "over my dead body",
|
|
166
|
+
"omg" : "oh my god",
|
|
167
|
+
"omw" : "on my way",
|
|
168
|
+
"p.a" : "per annum",
|
|
169
|
+
"p.m" : "after midday",
|
|
170
|
+
"pm" : "prime minister",
|
|
171
|
+
"poc" : "people of color",
|
|
172
|
+
"pov" : "point of view",
|
|
173
|
+
"pp" : "pages",
|
|
174
|
+
"ppl" : "people",
|
|
175
|
+
"prw" : "parents are watching",
|
|
176
|
+
"ps" : "postscript",
|
|
177
|
+
"pt" : "point",
|
|
178
|
+
"ptb" : "please text back",
|
|
179
|
+
"pto" : "please turn over",
|
|
180
|
+
"qpsa" : "what happens",
|
|
181
|
+
"ratchet" : "rude",
|
|
182
|
+
"rbtl" : "read between the lines",
|
|
183
|
+
"rlrt" : "real life retweet",
|
|
184
|
+
"rofl" : "rolling on the floor laughing",
|
|
185
|
+
"roflol" : "rolling on the floor laughing out loud",
|
|
186
|
+
"rotflmao" : "rolling on the floor laughing my ass off",
|
|
187
|
+
"rt" : "retweet",
|
|
188
|
+
"ruok" : "are you ok",
|
|
189
|
+
"sfw" : "safe for work",
|
|
190
|
+
"sk8" : "skate",
|
|
191
|
+
"smh" : "shake my head",
|
|
192
|
+
"sq" : "square",
|
|
193
|
+
"srsly" : "seriously",
|
|
194
|
+
"ssdd" : "same stuff different day",
|
|
195
|
+
"tbh" : "to be honest",
|
|
196
|
+
"tbs" : "tablespooful",
|
|
197
|
+
"tbsp" : "tablespooful",
|
|
198
|
+
"tfw" : "that feeling when",
|
|
199
|
+
"thks" : "thank you",
|
|
200
|
+
"tho" : "though",
|
|
201
|
+
"thx" : "thank you",
|
|
202
|
+
"tia" : "thanks in advance",
|
|
203
|
+
"til" : "today i learned",
|
|
204
|
+
"tl;dr" : "too long i did not read",
|
|
205
|
+
"tldr" : "too long i did not read",
|
|
206
|
+
"tmb" : "tweet me back",
|
|
207
|
+
"tntl" : "trying not to laugh",
|
|
208
|
+
"ttyl" : "talk to you later",
|
|
209
|
+
"u" : "you",
|
|
210
|
+
"u2" : "you too",
|
|
211
|
+
"u4e" : "yours for ever",
|
|
212
|
+
"utc" : "coordinated universal time",
|
|
213
|
+
"w/" : "with",
|
|
214
|
+
"w/o" : "without",
|
|
215
|
+
"w8" : "wait",
|
|
216
|
+
"wassup" : "what is up",
|
|
217
|
+
"wb" : "welcome back",
|
|
218
|
+
"wtf" : "what the fuck",
|
|
219
|
+
"wtg" : "way to go",
|
|
220
|
+
"wtpa" : "where the party at",
|
|
221
|
+
"wuf" : "where are you from",
|
|
222
|
+
"wuzup" : "what is up",
|
|
223
|
+
"wywh" : "wish you were here",
|
|
224
|
+
"yd" : "yard",
|
|
225
|
+
"ygtr" : "you got that right",
|
|
226
|
+
"ynk" : "you never know",
|
|
227
|
+
"zzz" : "sleeping bored and tired",
|
|
228
|
+
"ain't": "am not",
|
|
229
|
+
"aren't": "are not",
|
|
230
|
+
"can't": "cannot",
|
|
231
|
+
"can't've": "cannot have",
|
|
232
|
+
"'cause": "because",
|
|
233
|
+
"could've": "could have",
|
|
234
|
+
"couldn't": "could not",
|
|
235
|
+
"couldn't've": "could not have",
|
|
236
|
+
"didn't": "did not",
|
|
237
|
+
"doesn't": "does not",
|
|
238
|
+
"don't": "do not",
|
|
239
|
+
"hadn't": "had not",
|
|
240
|
+
"hadn't've": "had not have",
|
|
241
|
+
"hasn't": "has not",
|
|
242
|
+
"haven't": "have not",
|
|
243
|
+
"he'd": "he would",
|
|
244
|
+
"he'd've": "he would have",
|
|
245
|
+
"he'll": "he will",
|
|
246
|
+
"he'll've": "he will have",
|
|
247
|
+
"he's": "he is",
|
|
248
|
+
"how'd": "how did",
|
|
249
|
+
"how'd'y": "how do you",
|
|
250
|
+
"how'll": "how will",
|
|
251
|
+
"how's": "how does",
|
|
252
|
+
"i'd": "i would",
|
|
253
|
+
"i'd've": "i would have",
|
|
254
|
+
"i'll": "i will",
|
|
255
|
+
"i'll've": "i will have",
|
|
256
|
+
"i'm": "i am",
|
|
257
|
+
"i've": "i have",
|
|
258
|
+
"isn't": "is not",
|
|
259
|
+
"it'd": "it would",
|
|
260
|
+
"it'd've": "it would have",
|
|
261
|
+
"it'll": "it will",
|
|
262
|
+
"it'll've": "it will have",
|
|
263
|
+
"it's": "it is",
|
|
264
|
+
"let's": "let us",
|
|
265
|
+
"ma'am": "madam",
|
|
266
|
+
"mayn't": "may not",
|
|
267
|
+
"might've": "might have",
|
|
268
|
+
"mightn't": "might not",
|
|
269
|
+
"mightn't've": "might not have",
|
|
270
|
+
"must've": "must have",
|
|
271
|
+
"mustn't": "must not",
|
|
272
|
+
"mustn't've": "must not have",
|
|
273
|
+
"needn't": "need not",
|
|
274
|
+
"needn't've": "need not have",
|
|
275
|
+
"o'clock": "of the clock",
|
|
276
|
+
"oughtn't": "ought not",
|
|
277
|
+
"oughtn't've": "ought not have",
|
|
278
|
+
"shan't": "shall not",
|
|
279
|
+
"sha'n't": "shall not",
|
|
280
|
+
"shan't've": "shall not have",
|
|
281
|
+
"she'd": "she would",
|
|
282
|
+
"she'd've": "she would have",
|
|
283
|
+
"she'll": "she will",
|
|
284
|
+
"she'll've": "she will have",
|
|
285
|
+
"she's": "she is",
|
|
286
|
+
"should've": "should have",
|
|
287
|
+
"shouldn't": "should not",
|
|
288
|
+
"shouldn't've": "should not have",
|
|
289
|
+
"so've": "so have",
|
|
290
|
+
"so's": "so is",
|
|
291
|
+
"that'd": "that would",
|
|
292
|
+
"that'd've": "that would have",
|
|
293
|
+
"that's": "that is",
|
|
294
|
+
"there'd": "there would",
|
|
295
|
+
"there'd've": "there would have",
|
|
296
|
+
"there's": "there is",
|
|
297
|
+
"they'd": "they would",
|
|
298
|
+
"they'd've": "they would have",
|
|
299
|
+
"they'll": "they will",
|
|
300
|
+
"they'll've": "they will have",
|
|
301
|
+
"they're": "they are",
|
|
302
|
+
"they've": "they have",
|
|
303
|
+
"to've": "to have",
|
|
304
|
+
"wasn't": "was not",
|
|
305
|
+
"ur": "your",
|
|
306
|
+
"n": "and",
|
|
307
|
+
"won't": "would not",
|
|
308
|
+
"dis": "this",
|
|
309
|
+
"brng": "bring"
|
|
310
|
+
}
|