Skip to content

Commit 809f271

Browse files
authored
Merge pull request #1214 from PyThaiNLP/copilot/fix-documentation-inconsistencies
Fix documentation inconsistencies: SPDX headers and docstrings
2 parents 001f58a + 1da16f7 commit 809f271

7 files changed

Lines changed: 34 additions & 6 deletions

File tree

pythainlp/corpus/tnc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
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
"""

pythainlp/tag/_tag_perceptron.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Wannaphong Phatthiyaphaibun <wannaphong@pythainlp.org> (PyThaiNLP port)
1010
URL: <https://github.com/sloria/textblob-aptagger>
1111
<https://nltk.org/>
12+
1213
Copyright 2013 Matthew Honnibal
1314
NLTK modifications Copyright 2015 The NLTK Project
1415
PyThaiNLP modifications Copyright 2020 PyThaiNLP Project

pythainlp/tokenize/thai2fit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

pythainlp/tokenize/thaisumcut.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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
56
original codes are from: https://github.com/nakhunchumpolsathien/ThaiSum

pythainlp/transliterate/thaig2p.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@
2222

2323

2424
class 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

pythainlp/transliterate/thaig2p_v2.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@
1313

1414

1515
class 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"):

pythainlp/transliterate/umt5_thaig2p.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@
1313

1414

1515
class 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"):

0 commit comments

Comments
 (0)