forked from MycroftAI/lingua-franca
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
25 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,33 @@ | ||
# Lingua Nostra | ||
|
||
This is simply chatterbox's packaged version of https://github.com/MycroftAI/lingua-franca | ||
Lingua_Nostra is chatterbox's natural language parser, it converts natural | ||
language into data structures, and data structures into natural language! | ||
|
||
Latest version: 0.4.1 | ||
The main use case of lingua_nostra is handling dates and numbers | ||
|
||
currently these repos are nearly identical, but will diverge over time | ||
Latest version: 0.4.3 | ||
|
||
## Supported Languages | ||
|
||
```TODO here will be a nice table comparing the state of language support ``` | ||
|
||
## Usage | ||
|
||
see the extensive unittests! | ||
|
||
```python | ||
from lingua_nostra.format import nice_duration, nice_date, nice_date_time, \ | ||
nice_number, nice_time, pronounce_number | ||
from lingua_nostra.parse import extract_datetime, extract_number, \ | ||
extract_numbers, extract_duration, normalize | ||
|
||
pronounce_number(100034000000299792458, short_scale=False) | ||
#"one hundred trillion, thirty four thousand billion, " | ||
#"two hundred and ninety nine million, seven hundred and ninety " | ||
#"two thousand, four hundred and fifty eight" | ||
|
||
|
||
extract_numbers("1 dog, seven pigs, macdonald had a farm, " | ||
"3 times 5 macarena") | ||
# [1, 7, 3, 5] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters