Skip to content

Commit

Permalink
Fix unittest data path
Browse files Browse the repository at this point in the history
  • Loading branch information
bact committed Nov 11, 2024
1 parent fe46dfd commit 291cf8c
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ type: software
authors:
- family-names: Suntorntip
given-names: Thanathip
- family-names: "Suriyawongkul"
given-names: "Arthit"
- family-names: Suriyawongkul
given-names: Arthit
orcid: "https://orcid.org/0000-0002-9698-1899"
- family-names: Phatthiyaphaibun
given-names: Wannaphong
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,6 @@ Issues:

## License

nlpO3 is copyrighted by its authors and licensed under terms of the Apache
Software License 2.0 (Apache-2.0) - see file [LICENSE](./LICENSE) for details.
nlpO3 is copyrighted by its authors
and licensed under terms of the Apache Software License 2.0 (Apache-2.0).
See file [LICENSE](./LICENSE) for details.
6 changes: 6 additions & 0 deletions nlpo3-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ nlpo3 help
```bash
echo "ฉันกินข้าว" | nlpo3 segment
```

## License

nlpo3-cli is copyrighted by its authors
and licensed under terms of the Apache Software License 2.0 (Apache-2.0).
See file [LICENSE](./LICENSE) for details.
2 changes: 1 addition & 1 deletion nlpo3-nodejs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition = "2018"
license = "Apache-2.0"
authors = ["Thanathip Suntorntip Gorlph"]
description = "Node binding for nlpO3 Thai language processing library"
keywords = ["thai", "tokenizer", "nlp", "word-segmentation"]
categories = ["text-processing"]
keywords = ["thai", "tokenizer", "nlp", "word-segmentation"]
homepage = "https://github.com/PyThaiNLP/nlpo3/tree/main/nlpo3-nodejs/"
repository = "https://github.com/PyThaiNLP/nlpo3/"
documentation = "https://github.com/PyThaiNLP/nlpo3/tree/main/nlpo3-nodejs/README.md"
Expand Down
6 changes: 6 additions & 0 deletions nlpo3-nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,9 @@ Please report issues at <https://github.com/PyThaiNLP/nlpo3/issues>
## TODO

- Find a way to build binaries and publish on npm.

## License

nlpO3 Node binding is copyrighted by its authors
and licensed under terms of the Apache Software License 2.0 (Apache-2.0).
See file [LICENSE](./LICENSE) for details.
11 changes: 10 additions & 1 deletion nlpo3-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ homepage = "https://github.com/PyThaiNLP/nlpo3/tree/main/nlpo3-python"
repository = "https://github.com/PyThaiNLP/nlpo3/"
documentation = "https://github.com/PyThaiNLP/nlpo3/blob/main/nlpo3-python/README.md"
readme = "README.md"
exclude = [".gitignore", ".github/", "notebooks/", "tests/", "*.sh"]
exclude = [
".gitignore",
".github/",
"build/",
"dist/",
"notebooks/",
"target",
"tests/",
"*.sh",
]

[lib]
name = "_nlpo3_python_backend"
Expand Down
21 changes: 21 additions & 0 deletions nlpo3-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,27 @@ python -m build
This should generate a wheel file, in `dist/` directory,
which can be installed by pip.

To install a wheel from a local directory:

```bash
pip install dist/nlpo3-1.3.1-cp311-cp311-macosx_12_0_x86_64.whl
```

## Test

To run the Python unit test:

```bash
cd tests
python -m unittest
```

## Issues

Please report issues at <https://github.com/PyThaiNLP/nlpo3/issues>

## License

nlpO3 Python binding is copyrighted by its authors
and licensed under terms of the Apache Software License 2.0 (Apache-2.0).
See file [LICENSE](./LICENSE) for details.
2 changes: 1 addition & 1 deletion nlpo3-python/tests/test_tokenize.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def setUp(self):
)

def test_segment(self):
DICT_FILENAME = "tests/data/test_dict.txt"
DICT_FILENAME = "data/test_dict.txt"
DICT_NAME = "test_dict"
load_dict(DICT_FILENAME, DICT_NAME)

Expand Down

0 comments on commit 291cf8c

Please sign in to comment.