License
kham is dual-licensed under MIT and Apache-2.0. You may use it under either license at your option.
MIT License
MIT License Copyright (c) 2026 Nix.Labs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Apache License 2.0
Copyright 2026 Nix.Labs. 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 https://www.apache.org/licenses/LICENSE-2.0 .
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Full Apache 2.0 text on GitHub ↗Third-party Data Attributions
kham bundles several open datasets at compile time. Each is listed below with its license and source.
| Dataset | Used for | License | Source |
|---|---|---|---|
| words_th.txt | Built-in Thai word dictionary | CC0 1.0 | Thai word list (public domain) |
| tnc_freq.txt | TNC frequency table for DP scoring | CC0 | Thai National Corpus (TNC) / Thai Textbook Corpus (TTC) |
| stopwords (PyThaiNLP) | Thai stop-word set (1,029 entries) | Apache-2.0 | PyThaiNLP project |
| ne_th.tsv — countries | NE country gazetteer | Apache-2.0 | PyThaiNLP project |
| ne_th.tsv — Wikipedia titles | NE place/org gazetteer (+17,240 entries) | CC-BY-SA 4.0 | Wikipedia Thai article titles |
| ne_th.tsv — family names | NE person gazetteer (+8,980 entries) | CC-BY-SA 4.0 | Thai family names corpus |
| pos_th.tsv | POS tag lookup (13 ORCHID categories, ~9,000 entries) | CC-BY 4.0 | ORCHID corpus (NECTEC) |
| romanization_th.tsv | RTGS romanization map (415 entries) | CC0 | Royal Institute of Thailand RTGS tables |
CC-BY-SA 4.0 data is used only in embedded dictionaries distributed with the library binary. Algorithm implementations are clean-room, not derived from any copyrighted code.