Skip to content

Commit

Permalink
Better example
Browse files Browse the repository at this point in the history
  • Loading branch information
mgraffg committed Aug 3, 2024
1 parent d69fe0e commit f79f964
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions quarto/dialectid.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,16 @@ detect.countries
from dialectid import DialectId
detect = DialectId(lang='es', voc_size_exponent=15)
detect.predict(['comiendo unos tacos',
'tomando vino en la comida'])
'tomando vino en el asado'])
```

```{python}
#| echo: true
#| title: Decision Function
df = detect.decision_function('tomando vino en la comida')[0]
from dialectid import DialectId
detect = DialectId(lang='es', voc_size_exponent=15)
df = detect.decision_function('tomando vino en el asado')[0]
index = df.argsort()[::-1]
[(detect.countries[i], df[i]) for i in index
if df[i] > 0]
Expand Down

0 comments on commit f79f964

Please sign in to comment.