Neticle Wiki

Megmutatjuk mit gondol a Web!

Felhasználói eszközök

Eszközök a webhelyen


semantic_api_v1.0

Különbségek

A kiválasztott változat és az aktuális verzió közötti különbségek a következők.

Összehasonlító nézet linkje

Előző változat mindkét oldalon Előző változat
Következő változat
Előző változat
semantic_api_v1.0 [2015/06/21 12:32]
szekerespeter [Response explanation]
semantic_api_v1.0 [2016/07/08 22:37] (aktuális)
szekerespeter [Response explanation]
Sor 7: Sor 7:
 ^Version ^Description ^ ^Version ^Description ^
 |v1.0 | Initial internal version, created by Peter Szekeres on 2015.06.21.| |v1.0 | Initial internal version, created by Peter Szekeres on 2015.06.21.|
 +
 +===== Changelog =====
 +Compared to v0.1:
 +  * user_key parameter renamed to token
 +  * input_text is not an array of text but one text
 +  * entity recognition and analysis introduced so the response structure was redesigned: ​
 +    * entities and opinion are ecognized
 +    * mentioning sentences are shown
 +    * relations between entitis are shown
 +  * the range of recognized entities and labels is broadened with: hr, medical, legal and business topics and events
 +  * there are less parameters to set for a request
 + 
  
 ===== Text Analysis ===== ===== Text Analysis =====
Sor 59: Sor 71:
 | stem| whether to include the stemmed format of the original 'input text' within the API response.\\ \\ Possible values:\\ 1 - enabled\\ 0 - disabled (default)\\ \\ (optional parameter) | | stem| whether to include the stemmed format of the original 'input text' within the API response.\\ \\ Possible values:\\ 1 - enabled\\ 0 - disabled (default)\\ \\ (optional parameter) |
 | lang_check| whether to check that the original 'input text' is aligned with the **lang** parameter.\\ \\ Possible values:\\ 1 - enabled\\ 0 - disabled (default)\\ \\ (optional parameter) | | lang_check| whether to check that the original 'input text' is aligned with the **lang** parameter.\\ \\ Possible values:\\ 1 - enabled\\ 0 - disabled (default)\\ \\ (optional parameter) |
-| format| desired API output format\\ \\ Possible values:\\ json (default)\\ ​csv\\ \\ (optional parameter) |+| format| desired API output format\\ \\ Possible values:\\ json (default)\\ ​\\ (optional parameter) | 
 +| call_id| a special id to help to track calls for different topics\\ \\ Possible values:\\ any string shorter than 255 characters\\ \\ (optional parameter) | 
 +| replace_accent| whether to remove letter accents from the input text or not \\ \\ Possible values:\\ 1 - enabled\\ 0 - disabled (default)\\ \\ (optional parameter) |
  
 ==== Sample call ==== ==== Sample call ====
Sor 73: Sor 87:
 { {
     "​recognized_negative_phrases":​ [],     "​recognized_negative_phrases":​ [],
-    "entites": [+    "call_id":"​keywordname",​ 
 +    "​entities": [
         {         {
             "​related_pos_phrases":​ [             "​related_pos_phrases":​ [
                 {                 {
-                    "name": "egy jó gyors",​+                    "phrase": "egy jó gyors",​
                     "​related_mention_number":​ 1                     "​related_mention_number":​ 1
                 },                 },
                 {                 {
-                    "name": "​kényelmes",​+                    "phrase": "​kényelmes",​
                     "​related_mention_number":​ 1                     "​related_mention_number":​ 1
                 }                 }
Sor 104: Sor 119:
             "​related_pos_phrases":​ [             "​related_pos_phrases":​ [
                 {                 {
-                    "name": "egy jó gyors",​+                    "phrase": "egy jó gyors",​
                     "​related_mention_number":​ 1                     "​related_mention_number":​ 1
                 },                 },
                 {                 {
-                    "name": "​kényelmes",​+                    "phrase": "​kényelmes",​
                     "​related_mention_number":​ 1                     "​related_mention_number":​ 1
                 }                 }
Sor 141: Sor 156:
             "​related_pos_phrases":​ [             "​related_pos_phrases":​ [
                 {                 {
-                    "name": "​kényelmes",​+                    "phrase": "​kényelmes",​
                     "​related_mention_number":​ 1                     "​related_mention_number":​ 1
                 }                 }
Sor 157: Sor 172:
                 }                 }
             ],             ],
-            "entity_opinion_index":​ 5, +            "phrase": "egy jó gyors",​
-            "name": "egy jó gyors",​+
             "​mention_number":​ 1,             "​mention_number":​ 1,
-            "​type":​ "​pos_phrase",​ 
             "​mentions":​ [             "​mentions":​ [
                 " ez egy jó gyors és kényelmes autó"                 " ez egy jó gyors és kényelmes autó"
Sor 169: Sor 182:
             "​related_pos_phrases":​ [             "​related_pos_phrases":​ [
                 {                 {
-                    "name": "egy jó gyors",​+                    "phrase": "egy jó gyors",​
                     "​related_mention_number":​ 1                     "​related_mention_number":​ 1
                 }                 }
Sor 185: Sor 198:
                 }                 }
             ],             ],
-            "entity_opinion_index":​ 5, +            "phrase": "​kényelmes",​
-            "name": "​kényelmes",​+
             "​mention_number":​ 1,             "​mention_number":​ 1,
-            "​type":​ "​pos_phrase",​ 
             "​mentions":​ [             "​mentions":​ [
                 " ez egy jó gyors és kényelmes autó"                 " ez egy jó gyors és kényelmes autó"
Sor 205: Sor 216:
  
 ^Element ^ Description ^ ^Element ^ Description ^
-|entities | Recognized labels and entities (topics, attributes, brands, locations, etc. \\ \\ (If synonyms are set, only the labels related to the synonyms are recognized. If no synonyms set then every label is recognized in the text.) |+|entities | Recognized labels and entities (topics, attributes, brands, locations, etc. \\ \\ (If synonyms are set as parameters, only the labels, entities and phrases ​related to the target ​synonyms are recognized. If no synonyms set then every label, entity and phrase ​is recognized in the text.) ​
 +|entity_name| The name of the entity. | 
 +|entity_opinion_index| The quantified opinion related to the entity. | 
 +|entity_type| The type of the entity: topic, event, person, brand, attribute, location, etc. |
 |html_formatted_text| The HTML and CSS formatted text. \\ \\ If a sentence part contains a synonym it is surrounded by //​contain_keyword//​ class span tag. \\ \\ Recognized phrases are surrounded by //​polarity_item//​ class span tags.\\ \\ Recognized synonyms are surrounded by //synonym// class span tags.  | |html_formatted_text| The HTML and CSS formatted text. \\ \\ If a sentence part contains a synonym it is surrounded by //​contain_keyword//​ class span tag. \\ \\ Recognized phrases are surrounded by //​polarity_item//​ class span tags.\\ \\ Recognized synonyms are surrounded by //synonym// class span tags.  |
 |keyword_stats | Number of keyword and synonym mentions. | |keyword_stats | Number of keyword and synonym mentions. |
 +|mention_number | Number of separate entity mentions. |
 +|mentions | Relevant sentences of entity mentions. |
 |opinion_index | A score that represents how positive or negative is the text. 0 means neutral opinion, while negative value means negative opinion and positive value means positive opinion. | |opinion_index | A score that represents how positive or negative is the text. 0 means neutral opinion, while negative value means negative opinion and positive value means positive opinion. |
 +|phrase | The phrase recognized. |
 |processing_time_in_ms | The time needed to process the request. | |processing_time_in_ms | The time needed to process the request. |
 |recognized_negative_phrases | Negative phrases recognized in the text. \\ \\ (If synonyms are set, only the negative ​ phrases related to the synonyms are recognized. If no synonyms set then every negative phrase is recognized in the text.) | |recognized_negative_phrases | Negative phrases recognized in the text. \\ \\ (If synonyms are set, only the negative ​ phrases related to the synonyms are recognized. If no synonyms set then every negative phrase is recognized in the text.) |
 |recognized_positive_phrases | Positive phrases recognized in the text.  \\ \\ (If synonyms are set, only the positive phrases related to the synonyms are recognized. If no synonyms set then every positive phrase is recognized in the text.) | |recognized_positive_phrases | Positive phrases recognized in the text.  \\ \\ (If synonyms are set, only the positive phrases related to the synonyms are recognized. If no synonyms set then every positive phrase is recognized in the text.) |
 +|related_neg_phrases | Negative phrases related to the entity. |
 +|related_mention_number | The number of how many times mentioned together with the entity in the same sentence. |
 +|related_pos_phrases | Positive phrases related to the entity. ​ |
 |recognized_synonyms | Synonyms recognized in the text. | |recognized_synonyms | Synonyms recognized in the text. |
 |total_keyword_hit_number | Number of the target entity was mentioned in the input texts. Every synonym hit is counted. If no synonym is set the result is 0. | |total_keyword_hit_number | Number of the target entity was mentioned in the input texts. Every synonym hit is counted. If no synonym is set the result is 0. |
 |total_synonym_hit_numbers | Number of synonym mentions by each synonym. | |total_synonym_hit_numbers | Number of synonym mentions by each synonym. |
 +|call_id | A special id to help to track calls for different topics |
  
 ==== Error codes ==== ==== Error codes ====
  
 ^Error code ^Error message ^ ^Error code ^Error message ^
 +|0 |IP address is blacklisted |
 |1 |No lang parameter set | |1 |No lang parameter set |
 |2 |Incorrect lang value | |2 |Incorrect lang value |
Sor 228: Sor 249:
 |7 |Incorrect stem value | |7 |Incorrect stem value |
 |8 |Incorrect lang_check value | |8 |Incorrect lang_check value |
-|9 |No format ​parameter set +|9 |Incorrect ​format ​value 
-|10 |Incorrect ​format ​value |+|10|Incorrect ​replace_accent ​value|
 |unknown |Unknown exception | |unknown |Unknown exception |
 ===== Gender By Name ===== ===== Gender By Name =====
semantic_api_v1.0.1434882738.txt.gz · Utolsó módosítás: 2015/06/21 12:32 szerkesztette: szekerespeter