Update pages/5_Pre-procesing_of_text.py
Browse files- pages/5_Pre-procesing_of_text.py +16 -16
pages/5_Pre-procesing_of_text.py
CHANGED
|
@@ -160,10 +160,10 @@ st.markdown(
|
|
| 160 |
"""
|
| 161 |
<div class='info-box'>
|
| 162 |
<ul>
|
| 163 |
-
<li>πΉ A
|
| 164 |
<li>πΉ It takes a particular word which have some rule.</li>
|
| 165 |
<li>πΉ For a particular rule it'll going on removing suffix till it reaches 5th stage until the inflection is removed.</li>
|
| 166 |
-
<li>πΉ Works
|
| 167 |
</ul>
|
| 168 |
</div>
|
| 169 |
""",
|
|
@@ -175,8 +175,8 @@ st.markdown(
|
|
| 175 |
"""
|
| 176 |
<div class='info-box'>
|
| 177 |
<ul>
|
| 178 |
-
<li>πΉ An
|
| 179 |
-
<li>πΉ Can be applied to
|
| 180 |
</ul>
|
| 181 |
</div>
|
| 182 |
""",
|
|
@@ -189,9 +189,9 @@ st.markdown(
|
|
| 189 |
"""
|
| 190 |
<div class='info-box'>
|
| 191 |
<ul>
|
| 192 |
-
<li>πΉ An
|
| 193 |
-
<li>πΉ Removes suffixes in
|
| 194 |
-
<li>β οΈ
|
| 195 |
</ul>
|
| 196 |
</div>
|
| 197 |
""",
|
|
@@ -203,13 +203,13 @@ st.markdown("<h1 class='header-title'>π Lemmatization π</h1>", unsafe_allo
|
|
| 203 |
st.markdown(
|
| 204 |
"""
|
| 205 |
<div class='info-box'>
|
| 206 |
-
<p>π <span class='highlight'>Lemmatization</span> is the process of reducing an
|
| 207 |
<ul>
|
| 208 |
<li>πΉ <span class='highlight'>Inflected word β Root word (Lemma)</span></li>
|
| 209 |
-
<li>β
The
|
| 210 |
<li>π’ <span class='highlight'>Performance is slower</span> than stemming.</li>
|
| 211 |
-
<li>π
|
| 212 |
-
<li>π
|
| 213 |
</ul>
|
| 214 |
</div>
|
| 215 |
""",
|
|
@@ -222,12 +222,12 @@ st.markdown(
|
|
| 222 |
"""
|
| 223 |
<div class='info-box'>
|
| 224 |
<ul>
|
| 225 |
-
<li>πΉ Takes an
|
| 226 |
-
<li>ποΈ Searches in a
|
| 227 |
-
<li>π
|
| 228 |
<ul>
|
| 229 |
-
<li>βοΈ If it's an
|
| 230 |
-
<li>β If it's
|
| 231 |
</ul>
|
| 232 |
</ul>
|
| 233 |
</div>
|
|
|
|
| 160 |
"""
|
| 161 |
<div class='info-box'>
|
| 162 |
<ul>
|
| 163 |
+
<li>πΉ A Rule-based Algorithm for stemming.</li>
|
| 164 |
<li>πΉ It takes a particular word which have some rule.</li>
|
| 165 |
<li>πΉ For a particular rule it'll going on removing suffix till it reaches 5th stage until the inflection is removed.</li>
|
| 166 |
+
<li>πΉ Works only for the English language.</li>
|
| 167 |
</ul>
|
| 168 |
</div>
|
| 169 |
""",
|
|
|
|
| 175 |
"""
|
| 176 |
<div class='info-box'>
|
| 177 |
<ul>
|
| 178 |
+
<li>πΉ An advanced version of the Porter Stemmer.</li>
|
| 179 |
+
<li>πΉ Can be applied to multiple languages.</li>
|
| 180 |
</ul>
|
| 181 |
</div>
|
| 182 |
""",
|
|
|
|
| 189 |
"""
|
| 190 |
<div class='info-box'>
|
| 191 |
<ul>
|
| 192 |
+
<li>πΉ An Iterative Algorithm for stemming.</li>
|
| 193 |
+
<li>πΉ Removes suffixes in multiple iterations.</li>
|
| 194 |
+
<li>β οΈ More aggressive removal, which might result in non-English words.</li>
|
| 195 |
</ul>
|
| 196 |
</div>
|
| 197 |
""",
|
|
|
|
| 203 |
st.markdown(
|
| 204 |
"""
|
| 205 |
<div class='info-box'>
|
| 206 |
+
<p>π <span class='highlight'>Lemmatization</span> is the process of reducing an inflected word to its root form, known as the <span class='highlight'>lemma</span>.</p>
|
| 207 |
<ul>
|
| 208 |
<li>πΉ <span class='highlight'>Inflected word β Root word (Lemma)</span></li>
|
| 209 |
+
<li>β
The lemma is always an actual English word.</li>
|
| 210 |
<li>π’ <span class='highlight'>Performance is slower</span> than stemming.</li>
|
| 211 |
+
<li>π Both removal & dictionary-based checking are performed.</li>
|
| 212 |
+
<li>π Used when we need to preserve grammar in text.</li>
|
| 213 |
</ul>
|
| 214 |
</div>
|
| 215 |
""",
|
|
|
|
| 222 |
"""
|
| 223 |
<div class='info-box'>
|
| 224 |
<ul>
|
| 225 |
+
<li>πΉ Takes an inflected word as input.</li>
|
| 226 |
+
<li>ποΈ Searches in a huge dictionary (WordNet) containing millions of English words.</li>
|
| 227 |
+
<li>π Iteratively removes suffixes & checks:</li>
|
| 228 |
<ul>
|
| 229 |
+
<li>βοΈ If it's an actual English word, it continues removing more suffixes.</li>
|
| 230 |
+
<li>β If it's not an English word, the last valid root word is returned as the lemma.</li>
|
| 231 |
</ul>
|
| 232 |
</ul>
|
| 233 |
</div>
|