File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project.
1+ # SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project
2+ # SPDX-FileType: SOURCE
23# SPDX-License-Identifier: Apache-2.0
34"""Thai National Corpus word frequency
45"""
Original file line number Diff line number Diff line change 99 Wannaphong Phatthiyaphaibun <wannaphong@pythainlp.org> (PyThaiNLP port)
1010URL: <https://github.com/sloria/textblob-aptagger>
1111 <https://nltk.org/>
12+
1213Copyright 2013 Matthew Honnibal
1314NLTK modifications Copyright 2015 The NLTK Project
1415PyThaiNLP modifications Copyright 2020 PyThaiNLP Project
Original file line number Diff line number Diff line change 1- # SPDX-FileCopyrightText: 2026 PyThaiNLP Project
1+ # SPDX-FileCopyrightText: 2016- 2026 PyThaiNLP Project
22# SPDX-FileType: SOURCE
33# SPDX-License-Identifier: Apache-2.0
44
Original file line number Diff line number Diff line change 11# SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project
2- # SPDX-FileCopyrightText: Copyright 2020 Nakhun Chumpolsathien
2+ # SPDX-FileCopyrightText: 2020 Nakhun Chumpolsathien
3+ # SPDX-FileType: SOURCE
34# SPDX-License-Identifier: Apache-2.0
45"""The implementation of sentence segmentator from Nakhun Chumpolsathien, 2020
56original codes are from: https://github.com/nakhunchumpolsathien/ThaiSum
Original file line number Diff line number Diff line change 2222
2323
2424class ThaiG2P :
25- """Latin transliteration of Thai words, using International Phonetic Alphabet"""
25+ """
26+ Thai Grapheme-to-Phoneme using PyTorch-based model (v1).
27+
28+ This is the original Thai G2P model that converts Thai text to
29+ International Phonetic Alphabet (IPA) representation using a custom
30+ PyTorch neural network architecture.
31+
32+ For more information, see:
33+ https://github.com/wannaphong/thai-g2p
34+ """
2635
2736 def __init__ (self ):
2837 # get the model, download it if it's not available locally
Original file line number Diff line number Diff line change 1313
1414
1515class ThaiG2P :
16- """Latin transliteration of Thai words, using International Phonetic Alphabet
16+ """
17+ Thai Grapheme-to-Phoneme using transformer-based model (v2).
18+
19+ This version uses the Hugging Face transformers pipeline with the
20+ pythainlp/thaig2p-v2.0 model for converting Thai text to International
21+ Phonetic Alphabet (IPA) representation.
22+
23+ For more information, see:
24+ https://huggingface.co/pythainlp/thaig2p-v2.0
1725 """
1826
1927 def __init__ (self , device : str = "cpu" ):
Original file line number Diff line number Diff line change 1313
1414
1515class Umt5ThaiG2P :
16- """Latin transliteration of Thai words, using International Phonetic Alphabet
16+ """
17+ Thai Grapheme-to-Phoneme using UMT5 model.
18+
19+ This version uses the B-K/umt5-thai-g2p-v2-0.5k model based on UMT5
20+ (Unified Multilingual T5) for converting Thai text to International
21+ Phonetic Alphabet (IPA) representation.
22+
23+ For more information, see:
24+ https://huggingface.co/B-K/umt5-thai-g2p-v2-0.5k
1725 """
1826
1927 def __init__ (self , device : str = "cpu" ):
You can’t perform that action at this time.
0 commit comments