nlp-text-preprocessing 0.0.1__tar.gz → 0.0.2__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 → nlp_text_preprocessing-0.0.2}/PKG-INFO +17 -17
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/nlp_text_preprocessing.egg-info/PKG-INFO +17 -17
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/setup.py +1 -1
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/LICENSE +0 -0
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/MANIFEST.in +0 -0
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/nlp_text_preprocessing.egg-info/SOURCES.txt +0 -0
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/nlp_text_preprocessing.egg-info/dependency_links.txt +0 -0
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/nlp_text_preprocessing.egg-info/top_level.txt +0 -0
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/setup.cfg +0 -0
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/text_preprocessing/__init__.py +0 -0
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/text_preprocessing/all_text_preprocess.py +0 -0
- {nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/text_preprocessing/data/contractions.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nlp_text_preprocessing
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: This is a Text Processing Package For NLP
|
|
5
5
|
Author: Uditya Narayan Tiwari
|
|
6
6
|
Author-email: tiwarimerit@gmail.com
|
|
@@ -29,7 +29,7 @@ This Python package is created by [Uditya Narayan Tiwari](https://youtube.com/kg
|
|
|
29
29
|
### Installation from PyPi
|
|
30
30
|
You can install this package using pip as follows:
|
|
31
31
|
```
|
|
32
|
-
pip install
|
|
32
|
+
pip install nlp_text_preprocessing
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Installation from GitHub
|
|
@@ -43,7 +43,7 @@ pip install git+https://github.com/udityamerit/Text-Processing-Package-For-Natur
|
|
|
43
43
|
To uninstall the package, use the following command:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
pip uninstall
|
|
46
|
+
pip uninstall nlp_text_preprocessing
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
### Requirements
|
|
@@ -74,7 +74,7 @@ matplotlib
|
|
|
74
74
|
#### Lowercasing Text
|
|
75
75
|
|
|
76
76
|
```python
|
|
77
|
-
import
|
|
77
|
+
import nlp_text_preprocessing as tp
|
|
78
78
|
|
|
79
79
|
text = "HELLO WORLD!"
|
|
80
80
|
processed_text = tp.to_lower_case(text)
|
|
@@ -84,7 +84,7 @@ print(processed_text) # Output: hello world!
|
|
|
84
84
|
#### Expanding Contractions
|
|
85
85
|
|
|
86
86
|
```python
|
|
87
|
-
import
|
|
87
|
+
import nlp_text_preprocessing as tp
|
|
88
88
|
|
|
89
89
|
text = "I'm learning NLP."
|
|
90
90
|
processed_text = tp.contraction_to_expansion(text)
|
|
@@ -94,7 +94,7 @@ print(processed_text) # Output: I am learning NLP.
|
|
|
94
94
|
#### Removing Emails
|
|
95
95
|
|
|
96
96
|
```python
|
|
97
|
-
import
|
|
97
|
+
import nlp_text_preprocessing as tp
|
|
98
98
|
|
|
99
99
|
text = "Contact me at example@example.com"
|
|
100
100
|
processed_text = tp.remove_emails(text)
|
|
@@ -104,7 +104,7 @@ print(processed_text) # Output: Contact me at
|
|
|
104
104
|
#### Removing URLs
|
|
105
105
|
|
|
106
106
|
```python
|
|
107
|
-
import
|
|
107
|
+
import nlp_text_preprocessing as tp
|
|
108
108
|
|
|
109
109
|
text = "Check out https://example.com"
|
|
110
110
|
processed_text = tp.remove_urls(text)
|
|
@@ -114,7 +114,7 @@ print(processed_text) # Output: Check out
|
|
|
114
114
|
#### Removing HTML Tags
|
|
115
115
|
|
|
116
116
|
```python
|
|
117
|
-
import
|
|
117
|
+
import nlp_text_preprocessing as tp
|
|
118
118
|
|
|
119
119
|
text = "<p>Hello World!</p>"
|
|
120
120
|
processed_text = tp.remove_html_tags(text)
|
|
@@ -124,7 +124,7 @@ print(processed_text) # Output: Hello World!
|
|
|
124
124
|
#### Removing Special Characters
|
|
125
125
|
|
|
126
126
|
```python
|
|
127
|
-
import
|
|
127
|
+
import nlp_text_preprocessing as tp
|
|
128
128
|
|
|
129
129
|
text = "Hello @World! #NLP"
|
|
130
130
|
processed_text = tp.remove_special_chars(text)
|
|
@@ -136,7 +136,7 @@ print(processed_text) # Output: Hello World NLP
|
|
|
136
136
|
#### Lemmatization
|
|
137
137
|
|
|
138
138
|
```python
|
|
139
|
-
import
|
|
139
|
+
import nlp_text_preprocessing as tp
|
|
140
140
|
|
|
141
141
|
text = "running runs"
|
|
142
142
|
processed_text = tp.lemmatize(text)
|
|
@@ -146,7 +146,7 @@ print(processed_text) # Output: run run
|
|
|
146
146
|
#### Sentiment Analysis
|
|
147
147
|
|
|
148
148
|
```python
|
|
149
|
-
import
|
|
149
|
+
import nlp_text_preprocessing as tp
|
|
150
150
|
|
|
151
151
|
text = "I love programming!"
|
|
152
152
|
sentiment = tp.sentiment_analysis(text)
|
|
@@ -156,7 +156,7 @@ print(sentiment) # Output: Sentiment(polarity=0.5, subjectivity=0.6)
|
|
|
156
156
|
#### Detecting and Translating Language
|
|
157
157
|
|
|
158
158
|
```python
|
|
159
|
-
import
|
|
159
|
+
import nlp_text_preprocessing as tp
|
|
160
160
|
from googletrans import Translator
|
|
161
161
|
|
|
162
162
|
translator = Translator()
|
|
@@ -172,7 +172,7 @@ print(f"Language: {lang}, Translated: {translated_text}")
|
|
|
172
172
|
#### Word Count
|
|
173
173
|
|
|
174
174
|
```python
|
|
175
|
-
import
|
|
175
|
+
import nlp_text_preprocessing as tp
|
|
176
176
|
|
|
177
177
|
text = "I love NLP."
|
|
178
178
|
count = tp.word_count(text)
|
|
@@ -182,7 +182,7 @@ print(count) # Output: 3
|
|
|
182
182
|
#### Character Count
|
|
183
183
|
|
|
184
184
|
```python
|
|
185
|
-
import
|
|
185
|
+
import nlp_text_preprocessing as tp
|
|
186
186
|
|
|
187
187
|
text = "I love NLP."
|
|
188
188
|
count = tp.char_count(text)
|
|
@@ -192,7 +192,7 @@ print(count) # Output: 9
|
|
|
192
192
|
#### N-Grams
|
|
193
193
|
|
|
194
194
|
```python
|
|
195
|
-
import
|
|
195
|
+
import nlp_text_preprocessing as tp
|
|
196
196
|
|
|
197
197
|
text = "I love NLP"
|
|
198
198
|
ngrams = tp.n_grams(text, n=2)
|
|
@@ -204,7 +204,7 @@ print(ngrams) # Output: [('I', 'love'), ('love', 'NLP')]
|
|
|
204
204
|
Here’s an example of how you might use several functions together to clean text data:
|
|
205
205
|
|
|
206
206
|
```python
|
|
207
|
-
import
|
|
207
|
+
import nlp_text_preprocessing as tp
|
|
208
208
|
|
|
209
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
210
|
cleaned_text = tp.clean_text(text)
|
|
@@ -214,7 +214,7 @@ print(cleaned_text)
|
|
|
214
214
|
|
|
215
215
|
### One Short Feature Extraction
|
|
216
216
|
```python
|
|
217
|
-
import
|
|
217
|
+
import nlp_text_preprocessing as tp
|
|
218
218
|
|
|
219
219
|
tp.extract_features("I love NLP")
|
|
220
220
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nlp_text_preprocessing
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: This is a Text Processing Package For NLP
|
|
5
5
|
Author: Uditya Narayan Tiwari
|
|
6
6
|
Author-email: tiwarimerit@gmail.com
|
|
@@ -29,7 +29,7 @@ This Python package is created by [Uditya Narayan Tiwari](https://youtube.com/kg
|
|
|
29
29
|
### Installation from PyPi
|
|
30
30
|
You can install this package using pip as follows:
|
|
31
31
|
```
|
|
32
|
-
pip install
|
|
32
|
+
pip install nlp_text_preprocessing
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Installation from GitHub
|
|
@@ -43,7 +43,7 @@ pip install git+https://github.com/udityamerit/Text-Processing-Package-For-Natur
|
|
|
43
43
|
To uninstall the package, use the following command:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
pip uninstall
|
|
46
|
+
pip uninstall nlp_text_preprocessing
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
### Requirements
|
|
@@ -74,7 +74,7 @@ matplotlib
|
|
|
74
74
|
#### Lowercasing Text
|
|
75
75
|
|
|
76
76
|
```python
|
|
77
|
-
import
|
|
77
|
+
import nlp_text_preprocessing as tp
|
|
78
78
|
|
|
79
79
|
text = "HELLO WORLD!"
|
|
80
80
|
processed_text = tp.to_lower_case(text)
|
|
@@ -84,7 +84,7 @@ print(processed_text) # Output: hello world!
|
|
|
84
84
|
#### Expanding Contractions
|
|
85
85
|
|
|
86
86
|
```python
|
|
87
|
-
import
|
|
87
|
+
import nlp_text_preprocessing as tp
|
|
88
88
|
|
|
89
89
|
text = "I'm learning NLP."
|
|
90
90
|
processed_text = tp.contraction_to_expansion(text)
|
|
@@ -94,7 +94,7 @@ print(processed_text) # Output: I am learning NLP.
|
|
|
94
94
|
#### Removing Emails
|
|
95
95
|
|
|
96
96
|
```python
|
|
97
|
-
import
|
|
97
|
+
import nlp_text_preprocessing as tp
|
|
98
98
|
|
|
99
99
|
text = "Contact me at example@example.com"
|
|
100
100
|
processed_text = tp.remove_emails(text)
|
|
@@ -104,7 +104,7 @@ print(processed_text) # Output: Contact me at
|
|
|
104
104
|
#### Removing URLs
|
|
105
105
|
|
|
106
106
|
```python
|
|
107
|
-
import
|
|
107
|
+
import nlp_text_preprocessing as tp
|
|
108
108
|
|
|
109
109
|
text = "Check out https://example.com"
|
|
110
110
|
processed_text = tp.remove_urls(text)
|
|
@@ -114,7 +114,7 @@ print(processed_text) # Output: Check out
|
|
|
114
114
|
#### Removing HTML Tags
|
|
115
115
|
|
|
116
116
|
```python
|
|
117
|
-
import
|
|
117
|
+
import nlp_text_preprocessing as tp
|
|
118
118
|
|
|
119
119
|
text = "<p>Hello World!</p>"
|
|
120
120
|
processed_text = tp.remove_html_tags(text)
|
|
@@ -124,7 +124,7 @@ print(processed_text) # Output: Hello World!
|
|
|
124
124
|
#### Removing Special Characters
|
|
125
125
|
|
|
126
126
|
```python
|
|
127
|
-
import
|
|
127
|
+
import nlp_text_preprocessing as tp
|
|
128
128
|
|
|
129
129
|
text = "Hello @World! #NLP"
|
|
130
130
|
processed_text = tp.remove_special_chars(text)
|
|
@@ -136,7 +136,7 @@ print(processed_text) # Output: Hello World NLP
|
|
|
136
136
|
#### Lemmatization
|
|
137
137
|
|
|
138
138
|
```python
|
|
139
|
-
import
|
|
139
|
+
import nlp_text_preprocessing as tp
|
|
140
140
|
|
|
141
141
|
text = "running runs"
|
|
142
142
|
processed_text = tp.lemmatize(text)
|
|
@@ -146,7 +146,7 @@ print(processed_text) # Output: run run
|
|
|
146
146
|
#### Sentiment Analysis
|
|
147
147
|
|
|
148
148
|
```python
|
|
149
|
-
import
|
|
149
|
+
import nlp_text_preprocessing as tp
|
|
150
150
|
|
|
151
151
|
text = "I love programming!"
|
|
152
152
|
sentiment = tp.sentiment_analysis(text)
|
|
@@ -156,7 +156,7 @@ print(sentiment) # Output: Sentiment(polarity=0.5, subjectivity=0.6)
|
|
|
156
156
|
#### Detecting and Translating Language
|
|
157
157
|
|
|
158
158
|
```python
|
|
159
|
-
import
|
|
159
|
+
import nlp_text_preprocessing as tp
|
|
160
160
|
from googletrans import Translator
|
|
161
161
|
|
|
162
162
|
translator = Translator()
|
|
@@ -172,7 +172,7 @@ print(f"Language: {lang}, Translated: {translated_text}")
|
|
|
172
172
|
#### Word Count
|
|
173
173
|
|
|
174
174
|
```python
|
|
175
|
-
import
|
|
175
|
+
import nlp_text_preprocessing as tp
|
|
176
176
|
|
|
177
177
|
text = "I love NLP."
|
|
178
178
|
count = tp.word_count(text)
|
|
@@ -182,7 +182,7 @@ print(count) # Output: 3
|
|
|
182
182
|
#### Character Count
|
|
183
183
|
|
|
184
184
|
```python
|
|
185
|
-
import
|
|
185
|
+
import nlp_text_preprocessing as tp
|
|
186
186
|
|
|
187
187
|
text = "I love NLP."
|
|
188
188
|
count = tp.char_count(text)
|
|
@@ -192,7 +192,7 @@ print(count) # Output: 9
|
|
|
192
192
|
#### N-Grams
|
|
193
193
|
|
|
194
194
|
```python
|
|
195
|
-
import
|
|
195
|
+
import nlp_text_preprocessing as tp
|
|
196
196
|
|
|
197
197
|
text = "I love NLP"
|
|
198
198
|
ngrams = tp.n_grams(text, n=2)
|
|
@@ -204,7 +204,7 @@ print(ngrams) # Output: [('I', 'love'), ('love', 'NLP')]
|
|
|
204
204
|
Here’s an example of how you might use several functions together to clean text data:
|
|
205
205
|
|
|
206
206
|
```python
|
|
207
|
-
import
|
|
207
|
+
import nlp_text_preprocessing as tp
|
|
208
208
|
|
|
209
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
210
|
cleaned_text = tp.clean_text(text)
|
|
@@ -214,7 +214,7 @@ print(cleaned_text)
|
|
|
214
214
|
|
|
215
215
|
### One Short Feature Extraction
|
|
216
216
|
```python
|
|
217
|
-
import
|
|
217
|
+
import nlp_text_preprocessing as tp
|
|
218
218
|
|
|
219
219
|
tp.extract_features("I love NLP")
|
|
220
220
|
```
|
|
@@ -10,7 +10,7 @@ with open('requirements.txt') as fp:
|
|
|
10
10
|
setuptools.setup(
|
|
11
11
|
name='nlp_text_preprocessing',
|
|
12
12
|
include_package_data=True,
|
|
13
|
-
version='0.0.
|
|
13
|
+
version='0.0.2',
|
|
14
14
|
author='Uditya Narayan Tiwari',
|
|
15
15
|
author_email='tiwarimerit@gmail.com',
|
|
16
16
|
description='This is a Text Processing Package For NLP',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nlp_text_preprocessing-0.0.1 → nlp_text_preprocessing-0.0.2}/text_preprocessing/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|