File size: 7,417 Bytes
e4b9a7b | 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 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | .. currentmodule:: pythainlp.corpus
pythainlp.corpus
================
The :class:`pythainlp.corpus` module provides access to various Thai language corpora and resources that come bundled with PyThaiNLP. These resources are essential for natural language processing tasks in the Thai language.
Modules
-------
countries
~~~~~~~~~~
.. autofunction:: countries
:noindex:
find_synonym
~~~~~~~~~~~~
.. autofunction:: find_synonym
:noindex:
get_corpus
~~~~~~~~~~
.. autofunction:: get_corpus
:noindex:
get_corpus_as_is
~~~~~~~~~~
.. autofunction:: get_corpus_as_is
:noindex:
get_corpus_db
~~~~~~~~~~~~~~
.. autofunction:: get_corpus_db
:noindex:
get_corpus_db_detail
~~~~~~~~~~~~~~~~~~~~
.. autofunction:: get_corpus_db_detail
:noindex:
get_corpus_default_db
~~~~~~~~~~~~~~~~~~~~
.. autofunction:: get_corpus_default_db
:noindex:
get_corpus_path
~~~~~~~~~~~~~~
.. autofunction:: get_corpus_path
:noindex:
download
~~~~~~~~~~
.. autofunction:: download
:noindex:
remove
~~~~~~~
.. autofunction:: remove
:noindex:
provinces
~~~~~~~~~~
.. autofunction:: provinces
:noindex:
thai_dict
~~~~~~~~~~
.. autofunction:: thai_dict
:noindex:
thai_stopwords
~~~~~~~~~~~~~~
.. autofunction:: thai_stopwords
:noindex:
thai_words
~~~~~~~~~~
.. autofunction:: thai_words
:noindex:
thai_wsd_dict
~~~~~~~~~~~~~~
.. autofunction:: thai_wsd_dict
:noindex:
thai_orst_words
~~~~~~~~~~~~~~~~~
.. autofunction:: thai_orst_words
:noindex:
thai_synonyms
~~~~~~~~~~~~~~
.. autofunction:: thai_synonyms
:noindex:
thai_syllables
~~~~~~~~~~~~~~
.. autofunction:: thai_syllables
:noindex:
thai_negations
~~~~~~~~~~~~~~
.. autofunction:: thai_negations
:noindex:
thai_family_names
~~~~~~~~~~~~~~~~~~~
.. autofunction:: thai_family_names
:noindex:
thai_female_names
~~~~~~~~~~~~~~~~~~~
.. autofunction:: thai_female_names
:noindex:
thai_male_names
~~~~~~~~~~~~~~~~
.. autofunction:: thai_male_names
:noindex:
pythainlp.corpus.th_en_translit.get_transliteration_dict
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.th_en_translit.get_transliteration_dict
:noindex:
ConceptNet
----------
ConceptNet is an open, multilingual knowledge graph used for various natural language understanding tasks. For more information, refer to the `ConceptNet documentation <https://github.com/commonsense/conceptnet5/wiki/API>`_.
pythainlp.corpus.conceptnet.edges
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.conceptnet.edges
:noindex:
TNC (Thai National Corpus)
---
The Thai National Corpus (TNC) is a collection of text data in the Thai language. This module provides access to word frequency data from the TNC corpus.
pythainlp.corpus.tnc.word_freqs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.tnc.word_freqs
:noindex:
pythainlp.corpus.tnc.unigram_word_freqs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.tnc.unigram_word_freqs
:noindex:
pythainlp.corpus.tnc.bigram_word_freqs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.tnc.bigram_word_freqs
:noindex:
pythainlp.corpus.tnc.trigram_word_freqs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.tnc.trigram_word_freqs
:noindex:
TTC (Thai Textbook Corpus)
---
The Thai Textbook Corpus (TTC) is a collection of Thai language text data, primarily sourced from textbooks.
pythainlp.corpus.ttc.word_freqs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.ttc.word_freqs
:noindex:
pythainlp.corpus.ttc.unigram_word_freqs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.ttc.unigram_word_freqs
:noindex:
OSCAR
-----
OSCAR is a multilingual corpus that includes Thai text data. This module provides access to word frequency data from the OSCAR corpus.
pythainlp.corpus.oscar.word_freqs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.oscar.word_freqs
:noindex:
pythainlp.corpus.oscar.unigram_word_freqs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.oscar.unigram_word_freqs
:noindex:
Util
----
Utilities for working with the corpus data.
pythainlp.corpus.util.find_badwords
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.util.find_badwords
:noindex:
pythainlp.corpus.util.revise_wordset
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.util.revise_wordset
:noindex:
pythainlp.corpus.util.revise_newmm_default_wordset
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.util.revise_newmm_default_wordset
:noindex:
WordNet
-------
PyThaiNLP API includes the WordNet module, which is an exact copy of NLTK's WordNet API for the Thai language. WordNet is a lexical database for English and other languages.
For more details on WordNet, refer to the `NLTK WordNet documentation <https://www.nltk.org/howto/wordnet.html>`_.
pythainlp.corpus.wordnet.synsets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.synsets
:noindex:
pythainlp.corpus.wordnet.synset
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.synset
:noindex:
pythainlp.corpus.wordnet.all_lemma_names
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.all_lemma_names
:noindex:
pythainlp.corpus.wordnet.all_synsets
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.all_synsets
:noindex:
pythainlp.corpus.wordnet.langs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.langs
:noindex:
pythainlp.corpus.wordnet.lemmas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.lemmas
:noindex:
pythainlp.corpus.wordnet.lemma
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.lemma
:noindex:
pythainlp.corpus.wordnet.lemma_from_key
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.lemma_from_key
:noindex:
pythainlp.corpus.wordnet.path_similarity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.path_similarity
:noindex:
pythainlp.corpus.wordnet.lch_similarity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.lch_similarity
:noindex:
pythainlp.corpus.wordnet.wup_similarity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.wup_similarity
:noindex:
pythainlp.corpus.wordnet.morphy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.morphy
:noindex:
pythainlp.corpus.wordnet.custom_lemmas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autofunction:: pythainlp.corpus.wordnet.custom_lemmas
:noindex:
Definition
++++++++++
Synset
~~~~~~~
A synset is a set of synonyms that share a common meaning. The WordNet module provides functionality to work with these synsets.
This documentation is designed to help you navigate and use the various resources and modules available in the `pythainlp.corpus` package effectively. If you have any questions or need further assistance, please refer to the PyThaiNLP documentation or reach out to the PyThaiNLP community for support.
We hope you find this documentation helpful for your natural language processing tasks in the Thai language.
|