Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TinyDB as a dependency #691

Merged
merged 2 commits into from
Aug 22, 2022
Merged

Remove TinyDB as a dependency #691

merged 2 commits into from
Aug 22, 2022

Conversation

BLKSerene
Copy link
Contributor

@BLKSerene BLKSerene commented Aug 22, 2022

What does this changes

This PR removes TinyDB as a dependency.

What was wrong

TinyDB is an unnecessary external dependency.

How this fixes it

Remove TinyDB as a dependency and use json in the Python standard library instead.

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Passed code styles and structures
  • Passed code linting checks and unit test

@pep8speaks
Copy link

pep8speaks commented Aug 22, 2022

Hello @BLKSerene! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 448:80: E501 line too long (81 > 79 characters)

Comment last updated at 2022-08-22 16:26:11 UTC

@BLKSerene
Copy link
Contributor Author

PEP 8 should be happy now, please approve running CI and review the PR.

Copy link
Member

@wannaphong wannaphong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this pr! There are my review. The CI is not pass because json.dump doesn't save as utf-8.

pythainlp/corpus/core.py Outdated Show resolved Hide resolved
pythainlp/corpus/core.py Outdated Show resolved Hide resolved
pythainlp/corpus/core.py Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@BLKSerene
Copy link
Contributor Author

BLKSerene commented Aug 22, 2022

Initialization of the local database file fixed. Now should be fully compatible with the behavior of TinyDB.
The CI has passed, except for one test relating to ConceptNet API, it seem to be a network error from the API provider, hence irrelevant to this PR. https://api.conceptnet.io/c/th/%E0%B8%A3%E0%B8%B1%E0%B8%81 returns code 500.

@wannaphong wannaphong added this to the 3.1 milestone Aug 22, 2022
@wannaphong
Copy link
Member

Awesome Work!

Thank you.

@wannaphong wannaphong merged commit 976eb28 into PyThaiNLP:dev Aug 22, 2022
@BLKSerene BLKSerene mentioned this pull request Aug 23, 2022
4 tasks
This was referenced Aug 31, 2022
wannaphong added a commit that referenced this pull request Sep 1, 2022
See [3.1 Milestone](https://github.com/PyThaiNLP/pythainlp/milestone/16).

## What is new?
### Deprecation and other API changes
#687 Remove deprecated function
- pythainlp.word_vector; doesnt_match, get_model, most_similar_cosmul, sentence_vectorizer, similarity. use WordVector class instead
- pythainlp.util.delete_tone. use pythainlp.util.remove_tonemark instead
- Remove pythainlp.util.time_time. use pythainlp.util.time_to_thaiword instead
- pythainlp.tokenize.syllable_tokenize. use pythainlp.tokenize.subword_tokenize instead

### Name Entity Tagging
- #665 Add Thai-NNER `pythainlp.tag.NNER`
- #658 Add LST20NER onnx model. It is LST20NER model to onnx model from fine-turning by [WangchanBERTa model](https://huggingface.co/airesearch/wangchanberta-base-att-spm-uncased).

### Transliteration
- #659 Add ISO 11940 transliteration
- #660 Add Thai W2P v0.2
- #686 Add wunsen
- #694 Wunsen Mandarin and Japanese update

### PyThaiNLP Corpus downloader
- #656 Add support zip/tar.gz to download corpus

### Text normalization
- #673 Add a normalising rule for Lakkhangyao ๅ

### Translate
- #674 add gpu option

### Text summarize
- #679 Add mt5 cpe kmutt thai sentence sum

### Util
- #682 Add live-dead syllable classification
- #684 Add live dead syllable classify
- #690 Add tone detector

### Other
- #689 map NG tag to PART
- #691 Remove TinyDB as a dependency
- #692 Fix notifications that newer versions of corpora are available
@wannaphong wannaphong mentioned this pull request Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants