-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added new examples for language name and text classification
- Loading branch information
1 parent
0c9cea1
commit 9074b10
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env python | ||
|
||
from __future__ import division, print_function, absolute_import | ||
|
||
#***************************** TEXT CLASSIFICATION ************************************/ | ||
# | ||
# This example shows how to query Gurunudi to identify language of a text | ||
# | ||
#***************************** TEXT CLASSIFICATION ************************************/ | ||
|
||
from gurunudi import AI,lang | ||
|
||
#AI is the wrapper class to call Gurunudi AI API | ||
ai = AI() | ||
|
||
response = ai.classify("John ate an apple.","tense") | ||
print(response) | ||
|
||
response = ai.classify("Where are you going?.","mood") | ||
print(response) | ||
|
||
response = ai.classify("Einstein discovered relativity.","mood") | ||
print(response) | ||
|
||
response = ai.classify("You have won 1 million dollars","email") | ||
print(response) | ||
|
||
response = ai.classify("India wins the ICC world cup","news") | ||
print(response) | ||
|
||
response = ai.classify("that movie was really bad","sentiment") | ||
print(response) | ||
|
||
|
||
#For the latest updated list of languages supported by Gurunudi for text classification visit https://gurulaghu.com/languages/ | ||
|
||
|
||
|
||
|
||
|