Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aviks committed Aug 4, 2018
1 parent 19d58a5 commit 4e734b5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ filtered based on the detected script.
We detect 84 of the most common languages spoken around the world. This usually
covers most languages with more than 10 million native speakers.

Languages.detect("To be or not to be")
detector = LanguageDetector()
detector("To be or not to be")
# (Languages.English(), Languages.LatinScript(), 1.0)

The `detect` function returns the language, the script, and the confidence.
The `LanguageDetector` model returns the language, the script, and the confidence when applied to a string.

The language and script detection code in this package is ported from the rust package [whatlang-rs](https://github.com/greyblake/whatlang-rs). That package is in turn derived from [franc](https://github.com/wooorm/franc). See `LICENSE.whatlang-rs` for details.
The language and script detection code in this package is heavily inspired from the rust package [whatlang-rs](https://github.com/greyblake/whatlang-rs). That package is in turn derived from [franc](https://github.com/wooorm/franc). See `LICENSE.whatlang-rs` for details.

## Deprecations

Expand Down

0 comments on commit 4e734b5

Please sign in to comment.