Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pythainlp/corpus/tnc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project.
# SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: Apache-2.0
"""Thai National Corpus word frequency
"""
Expand Down
1 change: 1 addition & 0 deletions pythainlp/tag/_tag_perceptron.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Wannaphong Phatthiyaphaibun <wannaphong@pythainlp.org> (PyThaiNLP port)
URL: <https://github.com/sloria/textblob-aptagger>
<https://nltk.org/>

Copyright 2013 Matthew Honnibal
NLTK modifications Copyright 2015 The NLTK Project
PyThaiNLP modifications Copyright 2020 PyThaiNLP Project
Expand Down
2 changes: 1 addition & 1 deletion pythainlp/tokenize/thai2fit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2026 PyThaiNLP Project
# SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: Apache-2.0

Expand Down
3 changes: 2 additions & 1 deletion pythainlp/tokenize/thaisumcut.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2016-2026 PyThaiNLP Project
# SPDX-FileCopyrightText: Copyright 2020 Nakhun Chumpolsathien
# SPDX-FileCopyrightText: 2020 Nakhun Chumpolsathien
# SPDX-FileType: SOURCE
# SPDX-License-Identifier: Apache-2.0
"""The implementation of sentence segmentator from Nakhun Chumpolsathien, 2020
original codes are from: https://github.com/nakhunchumpolsathien/ThaiSum
Expand Down
11 changes: 10 additions & 1 deletion pythainlp/transliterate/thaig2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@


class ThaiG2P:
"""Latin transliteration of Thai words, using International Phonetic Alphabet"""
"""
Thai Grapheme-to-Phoneme using PyTorch-based model (v1).

This is the original Thai G2P model that converts Thai text to
International Phonetic Alphabet (IPA) representation using a custom
PyTorch neural network architecture.

For more information, see:
https://github.com/wannaphong/thai-g2p
"""

def __init__(self):
# get the model, download it if it's not available locally
Expand Down
10 changes: 9 additions & 1 deletion pythainlp/transliterate/thaig2p_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@


class ThaiG2P:
"""Latin transliteration of Thai words, using International Phonetic Alphabet
"""
Thai Grapheme-to-Phoneme using transformer-based model (v2).

This version uses the Hugging Face transformers pipeline with the
pythainlp/thaig2p-v2.0 model for converting Thai text to International
Phonetic Alphabet (IPA) representation.

For more information, see:
https://huggingface.co/pythainlp/thaig2p-v2.0
"""

def __init__(self, device: str = "cpu"):
Expand Down
10 changes: 9 additions & 1 deletion pythainlp/transliterate/umt5_thaig2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@


class Umt5ThaiG2P:
"""Latin transliteration of Thai words, using International Phonetic Alphabet
"""
Thai Grapheme-to-Phoneme using UMT5 model.

This version uses the B-K/umt5-thai-g2p-v2-0.5k model based on UMT5
(Unified Multilingual T5) for converting Thai text to International
Phonetic Alphabet (IPA) representation.

For more information, see:
https://huggingface.co/B-K/umt5-thai-g2p-v2-0.5k
"""

def __init__(self, device: str = "cpu"):
Expand Down
Loading