Language Detection
Language Detection
A very elementary function of the PoolParty Extractor is to detect the language from a text or even just a fragment. This method is called "detectLanguage" and the required parameter is "text".
We will use the following sample text in English:
'A Spritz Veneziano also called just Spritz or just Veneziano, is an Italian wine-based cocktail, commonly served as an aperitif in northeast Italy. The drink originated in Venice while it was part of the Austrian Empire, and is based on the Austrian Spritzer, a combination of equal parts white wine and soda water.'
Now enter the following request in the address bar of your browser:
Request
{{url}}/extractor/api/detectLanguage?text=A Spritz Veneziano also called just Spritz or just Veneziano, is an Italian wine-based cocktail, commonly served as an aperitif in northeast Italy. The drink originated in Venice while it was part of the Austrian Empire, and is based on the Austrian Spritzer, a combination of equal parts white wine and soda water.
This call returns the following results:
Results
"en"