Changeset - c0ac7e5989aa
[Not reviewed]
tip default
0 1 1
Laman - 5 months ago 2024-11-26 22:16:11

added build-requirements.txt, updated readme
2 files changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
README.md
Show inline comments
 
@@ -5,13 +5,19 @@ Language identification library based on
 

	
 
## Usage
 
1. Create a directory `data`, with a subdirectory for each target language. Fill with your training data.
 

	
 
2. Run `PYTHONPATH=src/ python3 train.py`. It will create a `models.json.gz` file.
 

	
 
3. You can now use:
 
3. Build and install the package:
 
```
 
python3 -m build
 
pip install dist/languedoc-...-py3-none-any.whl
 
```
 

	
 
4. You can now use:
 
```python
 
import languedoc
 

	
 
language = languedoc.identify("A text you want to identify.")
 
```
 
It will output the identifier that you used as the subdirectory name in step 1, based on the closest match between n-gram frequencies.
build-requirements.txt
Show inline comments
 
new file 100644
 
build
0 comments (0 inline, 0 general)