Skip to content

Commit

Permalink
Improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
omarmhaimdat committed Jan 29, 2023
1 parent a5cb7a5 commit 5212b17
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<a href="https://actions-badge.atrox.dev/omarmhaimdat/whatlang-pyo3/goto?ref=master"><img src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fomarmhaimdat%2Fwhatlang-pyo3%2Fbadge%3Fref%3Dmaster&style=flat" alt="Build Status" height="18"></a>
</p>
<p>
<img src="showcase.gif" alt="Showcase">
<img src="assets/showcase.gif" alt="Showcase">
</p>
</div>

Expand Down Expand Up @@ -79,6 +79,8 @@ Name: Latin - Languages: spa, eng, por, ind, fra, deu, jav, vie, ita, tur, pol,

You can also detect the language of a list of texts, and take advantage of the parallelism with the n_jobs parameter.

[![Batch detection](assets/batch.gif)](assets/batch.gif)

```python
>>> from whatlang import batch_detect
>>> batch_detect(["This is written in English", "Ceci est écrit en français"], n_jobs=-1)
Expand Down
Binary file added assets/batch.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
2 changes: 1 addition & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def compare_batch_with_single_performance():
# Create a list of 10000 texts
from whatlang import detect, batch_detect
import time
n = 1_000_000
n = 50_000
texts = ["Ceci est écrit en français"] * n
print("--------------------------Batch detect--------------------------")
start = time.perf_counter()
Expand Down

0 comments on commit 5212b17

Please sign in to comment.