Search is not available for this dataset
repo
stringlengths
2
152
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
deep-translator
deep-translator-master/deep_translator/qcri.py
__copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import os from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import ( BASE_URLS, QCRI_ENV_VAR, QCRI_LANGUAGE_TO_CODE, ) from deep_translator.exceptions import ( ApiKeyExc...
3,300
26.508333
97
py
deep-translator
deep-translator-master/deep_translator/tencent.py
""" tencent translator API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import base64 import hashlib import hmac import os import time from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import ( BASE_URLS, TENCENT_LANG...
4,180
30.674242
78
py
deep-translator
deep-translator-master/deep_translator/validate.py
__copyright__ = "Copyright (C) 2020 Nidhal Baccouri" from typing import Optional from deep_translator.exceptions import NotValidLength, NotValidPayload def is_empty(text: str) -> bool: return text == "" def request_failed(status_code: int) -> bool: """Check if a request has failed or not. A request is...
1,088
23.75
79
py
deep-translator
deep-translator-master/deep_translator/yandex.py
""" Yandex translator API """ __copyright__ = "Copyright (C) 2020 Nidhal Baccouri" import os from typing import List, Optional import requests from deep_translator.base import BaseTranslator from deep_translator.constants import BASE_URLS, YANDEX_ENV_VAR from deep_translator.exceptions import ( ApiKeyException,...
4,618
28.050314
75
py
deep-translator
deep-translator-master/docs/conf.py
#!/usr/bin/env python # # deep_translator documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file....
5,225
28.862857
151
py
deep-translator
deep-translator-master/examples/libre.py
from deep_translator import LibreTranslator res = LibreTranslator(source="de", target="en").translate("laufen") print(res)
125
20
67
py
deep-translator
deep-translator-master/examples/linguee.py
from deep_translator import LingueeTranslator res = LingueeTranslator(source="german", target="english").translate( "laufen", return_all=False ) print(res)
162
19.375
69
py
deep-translator
deep-translator-master/examples/mymemory.py
from deep_translator import MyMemoryTranslator res = MyMemoryTranslator(source="ar", target="en").translate("آخُذ اَلْباص.") print(res)
138
22.166667
77
py
deep-translator
deep-translator-master/examples/pons.py
from deep_translator import PonsTranslator res = PonsTranslator(source="en", target="de").translate( "good", return_all=False ) print(res)
145
17.25
57
py
deep-translator
deep-translator-master/examples/trans.py
from deep_translator import GoogleTranslator, LingueeTranslator, PonsTranslator # examples using google translate english_text = "happy coding" chinese_text = "這很好" translator = GoogleTranslator(source="auto", target="german") result1 = translator.translate(text=english_text) result2 = translator.translate(text=chine...
965
32.310345
79
py
deep-translator
deep-translator-master/tests/__init__.py
"""Unit test package for deep_translator."""
45
22
44
py
deep-translator
deep-translator-master/tests/test_baidu.py
from unittest.mock import Mock, patch import pytest from deep_translator import BaiduTranslator from deep_translator.exceptions import BaiduAPIerror @patch("deep_translator.baidu.requests") def test_simple_translation(mock_requests): translator = BaiduTranslator( appid="this-is-an-valid-appid", ...
1,868
27.318182
90
py
deep-translator
deep-translator-master/tests/test_cli.py
#!/usr/bin/env python """Tests for the CLI interface.""" import sys import pytest from deep_translator.cli import CLI @pytest.fixture def mock_args(): sys.argv[1:] = ["--source", "en", "--target", "de", "--text", "hello"] return CLI(sys.argv[1:]).parse_args() def test_source(mock_args): assert mock_...
406
15.958333
74
py
deep-translator
deep-translator-master/tests/test_data.py
test_text_standard = "Hello world." TRANSLATED_RESULTS = { "afrikaans": "Hello Wêreld.", "albanian": "Përshendetje Botë.", "amharic": "ሰላም ልዑል.", "arabic": "مرحبا بالعالم.", "armenian": "Բարեւ աշխարհ.", "azerbaijani": "Salam dünya.", "basque": "Kaixo Mundua.", "belarusian": "Прывітанне ...
3,552
30.442478
40
py
deep-translator
deep-translator-master/tests/test_deepl.py
from unittest.mock import Mock, patch import pytest from deep_translator.deepl import DeeplTranslator from deep_translator.exceptions import AuthorizationException @patch("deep_translator.deepl.requests") def test_simple_translation(mock_requests): translator = DeeplTranslator( api_key="imagine-this-is-...
1,054
31.96875
76
py
deep-translator
deep-translator-master/tests/test_google.py
#!/usr/bin/env python """Tests for `deep_translator` package.""" import pytest from deep_translator import GoogleTranslator, exceptions from deep_translator.constants import GOOGLE_LANGUAGES_TO_CODES @pytest.fixture def google_translator(): """Sample pytest fixture. See more at: http://doc.pytest.org/en/la...
1,757
26.904762
77
py
deep-translator
deep-translator-master/tests/test_libre.py
#!/usr/bin/env python """Tests for `deep_translator` package.""" import pytest from deep_translator import LibreTranslator, exceptions from deep_translator.constants import LIBRE_LANGUAGES_TO_CODES @pytest.fixture def libre(): return LibreTranslator(source="en", target="fr", api_key="some_key") def test_inpu...
1,186
28.675
72
py
deep-translator
deep-translator-master/tests/test_linguee.py
#!/usr/bin/env python """Tests for `deep_translator` package.""" import pytest from deep_translator import LingueeTranslator, exceptions @pytest.fixture def linguee(): return LingueeTranslator(source="english", target="german") def test_content(linguee): """Sample pytest test function with the pytest fix...
1,430
28.204082
77
py
deep-translator
deep-translator-master/tests/test_microsoft_trans.py
#!/usr/bin/env python """Tests for `deep_translator` package.""" from unittest.mock import patch import pytest import requests from deep_translator import MicrosoftTranslator, exceptions # mocked request.post @patch.object(requests, "post") def test_microsoft_successful_post_mock(mock_request_post): returned_...
2,329
27.765432
79
py
deep-translator
deep-translator-master/tests/test_mymemory.py
#!/usr/bin/env python """Tests for `deep_translator` package.""" import pytest from deep_translator import MyMemoryTranslator, exceptions @pytest.fixture def mymemory(): return MyMemoryTranslator(source="en-GB", target="fr-FR") def test_content(mymemory): """Sample pytest test function with the pytest fi...
1,353
27.808511
77
py
deep-translator
deep-translator-master/tests/test_pons.py
#!/usr/bin/env python """Tests for `deep_translator` package.""" import pytest from deep_translator import PonsTranslator, exceptions @pytest.fixture def pons(): return PonsTranslator(source="english", target="french") def test_content(pons): """Sample pytest test function with the pytest fixture as an a...
1,275
26.148936
77
py
deep-translator
deep-translator-master/tests/test_tencent.py
from unittest.mock import Mock, patch import pytest from deep_translator import TencentTranslator from deep_translator.exceptions import TencentAPIerror @patch("deep_translator.tencent.requests") def test_simple_translation(mock_requests): translator = TencentTranslator( secret_id="imagine-this-is-an-va...
2,307
29.773333
100
py
pythainlp-dev/.pep8speaks.yml
pythainlp-dev/.pep8speaks.yml
scanner: diff_only: True # If False, the entire file touched by the Pull Request is scanned for errors. If True, only the diff is scanned. linter: pycodestyle # Other option is flake8 pycodestyle: # Same as scanner.linter value. Other option is flake8 max-line-length: 100 # Default is 79 in PEP 8 i...
611
50
134
yml
pythainlp-dev/.pyup.yml
pythainlp-dev/.pyup.yml
# autogenerated pyup.io config file # see https://pyup.io/docs/configuration/ for all available options schedule: '' update: false requirements: - requirements.txt: # update all dependencies and pin them update: all pin: True - docker_requirements.txt: # don't update dependencies, use glob...
357
24.571429
67
yml
pythainlp-dev/CODE_OF_CONDUCT.md
pythainlp-dev/CODE_OF_CONDUCT.md
# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex ch...
3,352
42.545455
87
md
pythainlp-dev/CONTRIBUTING.md
pythainlp-dev/CONTRIBUTING.md
# Contributing to PyThaiNLP Hi! Thanks for your interest in contributing to [PyThaiNLP](https://github.com/PyThaiNLP/pythainlp). Please refer to our [Contributor Covenant Code of Conduct](https://github.com/PyThaiNLP/pythainlp/blob/dev/CODE_OF_CONDUCT.md). ## Issue Report and Discussion - Discussion: https://github...
7,030
43.783439
336
md
pythainlp-dev/INTHEWILD.md
pythainlp-dev/INTHEWILD.md
# Who uses PyThaiNLP? We'd like to keep track of who is using the package. Please send a PR with your company name or @githubhandle or company name with @githubhandle. Currently, officially using PyThaiNLP: 1. [Hope Data Annotations Co., Ltd.](https://hopedata.org) ([@hopedataannotations](https://github.com/hopedata...
433
47.222222
145
md
pythainlp-dev/README.md
pythainlp-dev/README.md
<div align="center"> <img src="https://avatars0.githubusercontent.com/u/32934255?s=200&v=4"/> <h1>PyThaiNLP: Thai Natural Language Processing in Python</h1> <a href="https://pypi.python.org/pypi/pythainlp"><img alt="pypi" src="https://img.shields.io/pypi/v/pythainlp.svg"/></a> <a href="https://www.python.org/do...
10,381
54.817204
374
md
pythainlp-dev/README_TH.md
pythainlp-dev/README_TH.md
<div align="center"> <img src="https://avatars0.githubusercontent.com/u/32934255?s=200&v=4"/> <h1>PyThaiNLP: Thai Natural Language Processing in Python</h1> <a href="https://pypi.python.org/pypi/pythainlp"><img alt="pypi" src="https://img.shields.io/pypi/v/pythainlp.svg"/></a> <a href="https://www.python.org/do...
10,391
53.125
459
md
pythainlp-dev/SECURITY.md
pythainlp-dev/SECURITY.md
# Security Policy ## Supported Versions | Version | Supported | | ------- | ------------------ | | 4.0.x | :white_check_mark: | | 3.1.x | :white_check_mark: | | 3.0.x | :x: | | 2.3.x | :x: | | 2.2.x | :x: | | 2.1.x | :x: | | 2.0.x | :x...
372
23.866667
32
md
pythainlp-dev/appveyor.yml
pythainlp-dev/appveyor.yml
#---------------------------------# # general configuration # #---------------------------------# #skip_commits: # message: /[skip ci]/ # skip if the commit message contains "(skip ci)" #---------------------------------# # environment configuration # #---------------------------------# image: Visu...
5,572
36.402685
135
yml
pythainlp-dev/setup.py
pythainlp-dev/setup.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
6,234
26.834821
78
py
pythainlp-dev/tokenization-benchmark.md
pythainlp-dev/tokenization-benchmark.md
# Word Tokenisation Benchmark for Thai (obsolete) A framework for benchmarking tokenisation algorithms for Thai. It has a command-line interface that allows users to conviniently execute the benchmarks as well as a module interface for later use in their development pipelines. ## Metrics <div align="center"> <im...
5,427
49.728972
436
md
pythainlp-dev/.github/pull_request_template.md
pythainlp-dev/.github/pull_request_template.md
### What does this changes Brief summary of the changes ### What was wrong Description of what was the root cause of the issue. ### How this fixes it Description of how the changes fix the issue. Fixes #... ### Your checklist for this pull request 🚨Please review the [guidelines for contributing](https://github....
477
22.9
133
md
pythainlp-dev/.github/ISSUE_TEMPLATE/config.yml
pythainlp-dev/.github/ISSUE_TEMPLATE/config.yml
--- blank_issues_enabled: true
31
9.666667
26
yml
pythainlp-dev/.github/ISSUE_TEMPLATE/feature_request.md
pythainlp-dev/.github/ISSUE_TEMPLATE/feature_request.md
--- name: Feature request about: Propose a change or an addition เสนอความสามารถใหม่ --- ## Detailed description <!--- Provide a detailed description of the change or addition you are proposing --> ## Context <!--- Why is this change important to you? How would you use it? --> <!--- How can it benefit other users? -->...
575
26.428571
84
md
pythainlp-dev/.github/ISSUE_TEMPLATE/issue_report.yml
pythainlp-dev/.github/ISSUE_TEMPLATE/issue_report.yml
name: "Issue report" description: "Create a report to help us improve รายงานปัญหา" title: "bug: " labels: ["NEED_TO_LABEL", "type:bug"] body: - type: textarea attributes: label: "Description" description: "Why you consider it to be an issue or a bug?" validations: required: true - type: textarea att...
1,534
21.910448
96
yml
pythainlp-dev/.github/workflows/codeql-analysis.yml
pythainlp-dev/.github/workflows/codeql-analysis.yml
# For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. # # ******** NOTE ******** # We have attempted to detect the languages in your ...
2,343
33.470588
188
yml
pythainlp-dev/.github/workflows/deploy_docs.yml
pythainlp-dev/.github/workflows/deploy_docs.yml
name: Deploy Docs dev on: push: branches: - dev paths-ignore: - '**.md' - '**.yml' jobs: release: name: Build runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v1 - name: Set up Python 3.8 uses: actions/setup-python@v1 with: python-version: 3.8 ...
1,195
26.813953
90
yml
pythainlp-dev/.github/workflows/greetings.yml
pythainlp-dev/.github/workflows/greetings.yml
name: Greetings on: [pull_request, issues] jobs: greeting: runs-on: ubuntu-latest steps: - uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} pr-message: 'Hello @${{ github.actor }}, thank you for submitting a PR! We will respond as soon as possible.'...
572
32.705882
145
yml
pythainlp-dev/.github/workflows/lint.yml
pythainlp-dev/.github/workflows/lint.yml
name: Lint on: push: branches: - dev paths-ignore: - '**.md' - '**.yml' - 'docs/**' pull_request: branches: - dev paths-ignore: - '**.md' - '**.yml' - 'docs/**' jobs: build: runs-on: ubuntu-20.04 strategy: matrix: python-vers...
1,554
27.796296
91
yml
pythainlp-dev/.github/workflows/macos-test.yml
pythainlp-dev/.github/workflows/macos-test.yml
name: macOS Unit test and code coverage on: push: paths-ignore: - '**.md' - 'docs/**' # - '**.yml' pull_request: branches: - dev paths-ignore: - '**.md' - '**.yml' - 'docs/**' jobs: build: runs-on: ${{ matrix.os }} strategy: fail-fast: false ...
2,815
30.288889
236
yml
pythainlp-dev/.github/workflows/pypi-publish.yml
pythainlp-dev/.github/workflows/pypi-publish.yml
name: Upload package to PyPI on: release: types: [created] jobs: deploy: runs-on: ubuntu-20.04 strategy: matrix: python-version: [3.8] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: ...
728
22.516129
54
yml
pythainlp-dev/.github/workflows/pypi-test.yml
pythainlp-dev/.github/workflows/pypi-test.yml
name: PyPI Unit test on: schedule: - cron: '0 0 * * *' # Once per day jobs: build: runs-on: ubuntu-20.04 strategy: matrix: python-version: [3.8] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 w...
1,251
26.217391
158
yml
pythainlp-dev/.github/workflows/stale.yml
pythainlp-dev/.github/workflows/stale.yml
# workflows from https://github.com/faster-cpython/cpython/blob/main/.github/workflows/stale.yml name: Mark stale pull requests on: schedule: - cron: "0 0 * * *" permissions: pull-requests: write jobs: stale: if: github.repository_owner == 'PyThaiNLP' runs-on: ubuntu-latest steps: - name: "...
707
23.413793
99
yml
pythainlp-dev/.github/workflows/test.yml
pythainlp-dev/.github/workflows/test.yml
name: Unit test and code coverage on: push: paths-ignore: - '**.md' - '**.yml' - 'docs/**' pull_request: paths-ignore: - '**.md' - '**.yml' - 'docs/**' jobs: build: runs-on: ubuntu-20.04 strategy: matrix: python-version: [3.8] steps: - ...
1,076
23.477273
144
yml
pythainlp-dev/.github/workflows/windows-test.yml
pythainlp-dev/.github/workflows/windows-test.yml
name: Windows Unit test and code coverage on: push: paths-ignore: - '**.md' - '**.yml' - 'docs/**' pull_request: branches: - dev paths-ignore: - '**.md' - '**.yml' - 'docs/**' jobs: build: runs-on: ${{ matrix.os }} strategy: fail-fast: false ...
1,726
25.569231
112
yml
pythainlp-dev/docs/build_docs.sh
pythainlp-dev/docs/build_docs.sh
#!/bin/bash make html
22
6.666667
11
sh
pythainlp-dev/docs/clean_directory.sh
pythainlp-dev/docs/clean_directory.sh
#!/bin/bash # Delete all files and folders in the directory: /pythainlp/docs/<version> # $1 : FTP_USER # $2 : FTP_PASSWORD # $3 : FTP_HOST # $4 : Brnach name FTP_USER=$1 FTP_PASSWORD=$2 FTP_HOST=$3 BRANCH_NAME=$4 remove_all_files() { # DIRECTORY=$1 echo "Delete files in: $1" for f in `curl --list-only -...
1,682
29.6
145
sh
pythainlp-dev/docs/conf.py
pythainlp-dev/docs/conf.py
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # http://www.sphinx-doc.org/en/master/config import os import sys import traceback from datetime import datetime import pythainlp # -- Path setup -------------------------------------------------------------- # If extensions (or mod...
7,237
27.952
79
py
pythainlp-dev/docs/_static/style.css
pythainlp-dev/docs/_static/style.css
.wy-nav-content { max-width: none; }
41
9.5
20
css
pythainlp-dev/pythainlp/__init__.py
pythainlp-dev/pythainlp/__init__.py
# -*- coding: utf-8 -*- # PyThaiNLP: Thai Natural Language Processing in Python # # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://ww...
2,271
32.411765
76
py
pythainlp-dev/pythainlp/__main__.py
pythainlp-dev/pythainlp/__main__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
1,428
25.962264
74
py
pythainlp-dev/pythainlp/augment/__init__.py
pythainlp-dev/pythainlp/augment/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
716
31.590909
74
py
pythainlp-dev/pythainlp/augment/wordnet.py
pythainlp-dev/pythainlp/augment/wordnet.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
5,868
24.854626
77
py
pythainlp-dev/pythainlp/augment/lm/__init__.py
pythainlp-dev/pythainlp/augment/lm/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
810
30.192308
74
py
pythainlp-dev/pythainlp/augment/lm/fasttext.py
pythainlp-dev/pythainlp/augment/lm/fasttext.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
3,003
31.652174
74
py
pythainlp-dev/pythainlp/augment/lm/wangchanberta.py
pythainlp-dev/pythainlp/augment/lm/wangchanberta.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
3,157
32.595745
79
py
pythainlp-dev/pythainlp/augment/word2vec/__init__.py
pythainlp-dev/pythainlp/augment/word2vec/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
856
34.708333
74
py
pythainlp-dev/pythainlp/augment/word2vec/bpemb_wv.py
pythainlp-dev/pythainlp/augment/word2vec/bpemb_wv.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
2,394
29.316456
76
py
pythainlp-dev/pythainlp/augment/word2vec/core.py
pythainlp-dev/pythainlp/augment/word2vec/core.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
2,616
33.434211
74
py
pythainlp-dev/pythainlp/augment/word2vec/ltw2v.py
pythainlp-dev/pythainlp/augment/word2vec/ltw2v.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
2,122
29.768116
96
py
pythainlp-dev/pythainlp/augment/word2vec/thai2fit.py
pythainlp-dev/pythainlp/augment/word2vec/thai2fit.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
2,110
29.594203
79
py
pythainlp-dev/pythainlp/benchmarks/__init__.py
pythainlp-dev/pythainlp/benchmarks/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
735
32.454545
74
py
pythainlp-dev/pythainlp/benchmarks/word_tokenization.py
pythainlp-dev/pythainlp/benchmarks/word_tokenization.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
8,159
27.235294
97
py
pythainlp-dev/pythainlp/chat/__init__.py
pythainlp-dev/pythainlp/chat/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
711
31.363636
74
py
pythainlp-dev/pythainlp/chat/core.py
pythainlp-dev/pythainlp/chat/core.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
2,790
33.8875
117
py
pythainlp-dev/pythainlp/cli/__init__.py
pythainlp-dev/pythainlp/cli/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
1,158
30.324324
74
py
pythainlp-dev/pythainlp/cli/benchmark.py
pythainlp-dev/pythainlp/cli/benchmark.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
5,723
30.977654
79
py
pythainlp-dev/pythainlp/cli/data.py
pythainlp-dev/pythainlp/cli/data.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
4,521
34.328125
79
py
pythainlp-dev/pythainlp/cli/soundex.py
pythainlp-dev/pythainlp/cli/soundex.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
1,946
29.904762
77
py
pythainlp-dev/pythainlp/cli/tag.py
pythainlp-dev/pythainlp/cli/tag.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
2,719
29.909091
78
py
pythainlp-dev/pythainlp/cli/tokenize.py
pythainlp-dev/pythainlp/cli/tokenize.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
5,231
31.7
78
py
pythainlp-dev/pythainlp/cls/__init__.py
pythainlp-dev/pythainlp/cls/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
709
31.272727
74
py
pythainlp-dev/pythainlp/cls/param_free.py
pythainlp-dev/pythainlp/cls/param_free.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
2,095
36.428571
162
py
pythainlp-dev/pythainlp/coref/__init__.py
pythainlp-dev/pythainlp/coref/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
748
36.45
74
py
pythainlp-dev/pythainlp/coref/_fastcoref.py
pythainlp-dev/pythainlp/coref/_fastcoref.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
1,418
35.384615
103
py
pythainlp-dev/pythainlp/coref/core.py
pythainlp-dev/pythainlp/coref/core.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
1,935
34.2
95
py
pythainlp-dev/pythainlp/coref/han_coref.py
pythainlp-dev/pythainlp/coref/han_coref.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
930
34.807692
74
py
pythainlp-dev/pythainlp/corpus/__init__.py
pythainlp-dev/pythainlp/corpus/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
2,914
23.291667
74
py
pythainlp-dev/pythainlp/corpus/common.py
pythainlp-dev/pythainlp/corpus/common.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
9,930
30.932476
100
py
pythainlp-dev/pythainlp/corpus/conceptnet.py
pythainlp-dev/pythainlp/corpus/conceptnet.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
4,489
35.504065
79
py
pythainlp-dev/pythainlp/corpus/core.py
pythainlp-dev/pythainlp/corpus/core.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
17,493
30.128114
85
py
pythainlp-dev/pythainlp/corpus/corpus_license.md
pythainlp-dev/pythainlp/corpus/corpus_license.md
# Corpus License - Corpora, datasets, and documentation created by PyThaiNLP project are released under [Creative Commons Zero 1.0 Universal Public Domain Dedication License](https://creativecommons.org/publicdomain/zero/1.0/) (CC0). - Language models created by PyThaiNLP project are released under [Creative Commons A...
4,939
46.5
216
md
pythainlp-dev/pythainlp/corpus/oscar.py
pythainlp-dev/pythainlp/corpus/oscar.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
2,240
31.478261
74
py
pythainlp-dev/pythainlp/corpus/th_en_translit.py
pythainlp-dev/pythainlp/corpus/th_en_translit.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
3,039
34.764706
107
py
pythainlp-dev/pythainlp/corpus/tnc.py
pythainlp-dev/pythainlp/corpus/tnc.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
2,755
27.708333
86
py
pythainlp-dev/pythainlp/corpus/ttc.py
pythainlp-dev/pythainlp/corpus/ttc.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
1,824
29.416667
96
py
pythainlp-dev/pythainlp/corpus/util.py
pythainlp-dev/pythainlp/corpus/util.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
4,996
31.23871
85
py
pythainlp-dev/pythainlp/corpus/wordnet.py
pythainlp-dev/pythainlp/corpus/wordnet.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
13,894
29.605727
74
py
pythainlp-dev/pythainlp/generate/__init__.py
pythainlp-dev/pythainlp/generate/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
747
33
74
py
pythainlp-dev/pythainlp/generate/core.py
pythainlp-dev/pythainlp/generate/core.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
9,224
28.951299
124
py
pythainlp-dev/pythainlp/generate/thai2fit.py
pythainlp-dev/pythainlp/generate/thai2fit.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
3,070
23.373016
89
py
pythainlp-dev/pythainlp/generate/wangchanglm.py
pythainlp-dev/pythainlp/generate/wangchanglm.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
6,451
35.451977
124
py
pythainlp-dev/pythainlp/khavee/__init__.py
pythainlp-dev/pythainlp/khavee/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
693
37.555556
74
py
pythainlp-dev/pythainlp/khavee/core.py
pythainlp-dev/pythainlp/khavee/core.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
18,749
38.473684
281
py
pythainlp-dev/pythainlp/khavee/example.py
pythainlp-dev/pythainlp/khavee/example.py
# -*- coding: utf-8 -*- import core kv = core.KhaveeVerifier() # การเช็คสระ print('เออ',kv.check_sara('เมอ')) # 'เออ' # การเช็คมาตราตัวสะกด print('เทอว',kv.check_marttra('เทอว')) # 'เกอว' # การตรวจสอบคำสำผัสที่ถูกต้อง print('สรร อัน',kv.is_sumpus('สรร','อัน')) # True # การตรวจสอบคำสำผัสที่ผิด print('เพื่อน ล้วน',k...
2,982
40.430556
172
py
pythainlp-dev/pythainlp/parse/__init__.py
pythainlp-dev/pythainlp/parse/__init__.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
723
35.2
74
py
pythainlp-dev/pythainlp/parse/core.py
pythainlp-dev/pythainlp/parse/core.py
# -*- coding: utf-8 -*- # Copyright (C) 2016-2023 PyThaiNLP Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
5,798
44.661417
96
py
pythainlp-dev/pythainlp/parse/esupar_engine.py
pythainlp-dev/pythainlp/parse/esupar_engine.py
# -*- coding: utf-8 -*- """ esupar: Tokenizer POS-tagger and Dependency-parser with BERT/RoBERTa/DeBERTa models for Japanese and other languages GitHub: https://github.com/KoichiYasuoka/esupar """ from typing import List, Union try: import esupar except ImportError: raise ImportError("Import Error; Install es...
853
25.6875
116
py