Skip to content

Commit e3adf5b

Browse files
committed
Add SPDX FileType
1 parent 9a1274b commit e3adf5b

File tree

219 files changed

+235
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+235
-8
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
2+
# SPDX-FileType: SOURCE
23
# SPDX-License-Identifier: Apache-2.0
34

45
FROM python:3.8-slim-buster

docs/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
#
56
# Configuration file for the Sphinx documentation builder.

examples/khavee.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
4-
5-
# Example of using KhaveeVerifier from pythainlp.khavee
5+
"""
6+
Example of using KhaveeVerifier from pythainlp.khavee
7+
"""
68

79
from pythainlp.khavee import KhaveeVerifier
810

911

1012
kv = KhaveeVerifier()
1113

12-
1314
# การเช็คสระ
1415
print("เออ", kv.check_sara("เมอ"))
1516
# 'เออ'

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
2+
# SPDX-FileType: SOURCE
23
# SPDX-License-Identifier: Apache-2.0
34

45
[tool.ruff]

pythainlp/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
__version__ = "5.0.5-dev"
56

pythainlp/ancient/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Ancient versions of the Thai language

pythainlp/ancient/aksonhan.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
5+
46
from pythainlp import thai_consonants, thai_tonemarks
57
from pythainlp.corpus import thai_orst_words
68
from pythainlp.tokenize import Tokenizer

pythainlp/augment/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Thai text augment

pythainlp/augment/lm/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Language Models

pythainlp/augment/lm/fasttext.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
import itertools
56
from typing import List, Tuple

pythainlp/augment/lm/phayathaibert.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45

56
import random

pythainlp/augment/lm/wangchanberta.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45

56
from typing import List

pythainlp/augment/word2vec/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Word2Vec

pythainlp/augment/word2vec/bpemb_wv.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
from typing import List, Tuple
56

pythainlp/augment/word2vec/core.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
import itertools
56
from typing import List, Tuple

pythainlp/augment/word2vec/ltw2v.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
from typing import List, Tuple
56

pythainlp/augment/word2vec/thai2fit.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
from typing import List, Tuple
56

pythainlp/augment/wordnet.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Thank https://dev.to/ton_ami/text-data-augmentation-synonym-replacement-4h8l

pythainlp/benchmarks/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Performance benchmarking.

pythainlp/benchmarks/word_tokenization.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45

56
import re

pythainlp/chat/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
pythainlp.chat

pythainlp/chat/core.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
import torch
56

pythainlp/classify/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
pythainlp.classify

pythainlp/classify/param_free.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45

56
import gzip

pythainlp/cli/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""Command line helpers."""
56

pythainlp/cli/benchmark.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
33
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
4+
# SPDX-FileType: SOURCE
45
# SPDX-License-Identifier: Apache-2.0
56

67
import argparse

pythainlp/cli/data.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Command line for PyThaiNLP's dataset/corpus management.

pythainlp/cli/soundex.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Command line for PyThaiNLP's soundex.

pythainlp/cli/tag.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Command line for PyThaiNLP's taggers.

pythainlp/cli/tokenize.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Command line for PyThaiNLP's tokenizers.

pythainlp/cls/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
pythainlp.cls

pythainlp/coref/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
PyThaiNLP Coreference Resolution

pythainlp/coref/_fastcoref.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
from typing import List
56

pythainlp/coref/core.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
from typing import List
56

pythainlp/coref/han_coref.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
import spacy
56

pythainlp/corpus/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Corpus related functions.

pythainlp/corpus/common.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45

56
"""

pythainlp/corpus/conceptnet.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Get data from ConceptNet API at http://conceptnet.io

pythainlp/corpus/core.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Corpus related functions.

pythainlp/corpus/icu.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Provides an optional word list from International Components for Unicode (ICU) dictionary.

pythainlp/corpus/oscar.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Thai unigram word frequency from OSCAR Corpus (words tokenized using ICU)

pythainlp/corpus/th_en_translit.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Thai-English Transliteration Dictionary v1.4

pythainlp/corpus/ttc.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Thai Textbook Corpus (TTC) word frequency

pythainlp/corpus/util.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Tool for creating word lists

pythainlp/corpus/volubilis.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Provides an optional word list from the Volubilis dictionary.

pythainlp/corpus/wikipedia.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Provides an optional word list from Thai Wikipedia titles.

pythainlp/corpus/wordnet.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
NLTK WordNet wrapper

pythainlp/el/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
pythainlp.el

pythainlp/el/_multiel.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45

56

pythainlp/el/core.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
from typing import List, Union
56

pythainlp/generate/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Thai Text Generation

pythainlp/generate/core.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Text generator using n-gram language model

pythainlp/generate/thai2fit.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
"""
56
Thai2fit: Thai Wikipeida Language Model for Text Generation

pythainlp/generate/wangchanglm.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45
import re
56

pythainlp/khavee/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# SPDX-FileCopyrightText: 2016-2024 PyThaiNLP Project
3+
# SPDX-FileType: SOURCE
34
# SPDX-License-Identifier: Apache-2.0
45

56
__all__ = ["KhaveeVerifier"]

0 commit comments

Comments
 (0)