Neticle Wiki

Megmutatjuk mit gondol a Web!

Felhasználói eszközök

Eszközök a webhelyen


semantic_api_v2.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_v2.0 [2019/02/01 14:15]
zoltancsikos
semantic_api_v2.0 [2019/04/09 12:32] (aktuális)
zoltancsikos
Sor 61: Sor 61:
 | token | String | X  | Token received from Neticle Labs to authenticate the user. |  |  | | token | String | X  | Token received from Neticle Labs to authenticate the user. |  |  |
 | input | String | X  | The text to analyze. |  | I like this nice apple. | | input | String | X  | The text to analyze. |  | I like this nice apple. |
-| language | String |  | The language of the input text. If this parameters is empty, the API will try to identify the language based on the text and process it accordingly. If you know the language, the preferred option is to provide it to the API. \\ \\ Possible values:\\ \\ bg - Bulgarian\\ de - German\\ en - English \\ ge - Georgian \\ hu - Hungarian \\ pl - Polish \\ ro - Romanian \\ ru - Russian \\ ua - Ukrainian ​ |  | en |+| language | String |  | The language of the input text. If this parameters is empty, the API will try to identify the language based on the text and process it accordingly. If you know the language, the preferred option is to provide it to the API. \\ \\ Possible values:\\ \\ bg - Bulgarian\\ de - German\\ en - English \\ ge - Georgian \\ hu - Hungarian ​\\ nl - Dutch \\ pl - Polish \\ ro - Romanian \\ ru - Russian \\ ua - Ukrainian ​ |  | en |
 | format | String |  | Format of the response. Currently only JSON is supported. | json |   | | format | String |  | Format of the response. Currently only JSON is supported. | json |   |
 | replaceaccent | Boolean |  | If set to true, the API will remove all accents from the characters before processing. \\ \\ For example it will convert the letters //é á ű ó// into //e a u o//. | false |  | | replaceaccent | Boolean |  | If set to true, the API will remove all accents from the characters before processing. \\ \\ For example it will convert the letters //é á ű ó// into //e a u o//. | false |  |
 | lowercase | Boolean |   | If set to true, the API will convert the input text to lowercase before processing. | false |   | | lowercase | Boolean |   | If set to true, the API will convert the input text to lowercase before processing. | false |   |
 | callid | String |  | A field to be used by the client, to help tracking calls from different sources from the client'​s side. Length is max 255 characters. |  | internal system 1 | | callid | String |  | A field to be used by the client, to help tracking calls from different sources from the client'​s side. Length is max 255 characters. |  | internal system 1 |
-| keywords | [[api_textanalysis#Keyword object|Array of nested keyword objects]] |  | Nested object array containing different keyword objects (see below), to provide keyword oriented sentiment and topic analysis that only analyze the parts related to the given keyword. If not set (or set to empty array) then the API will process a full text analysis on the provided text. |  |  |+| keywords | [[semantic_api_v2.0#Keyword object|Array of nested keyword objects]] |  | Nested object array containing different keyword objects (see below), to provide keyword oriented sentiment and topic analysis that only analyze the parts related to the given keyword. If not set (or set to empty array) then the API will process a full text analysis on the provided text. |  |  |
  
 === Keyword object === === Keyword object ===
Sor 106: Sor 106:
 | input_length | Integer | The number of characters in the received text. | | input_length | Integer | The number of characters in the received text. |
 | total_processing_time_in_ms | Integer | Number of milliseconds of the total processing time. | | total_processing_time_in_ms | Integer | Number of milliseconds of the total processing time. |
-| results | [[api_textanalysis#The result object|Array of nested result objects]] | The results after processing the text. If no keyword has been sent this will contain only one element. If multiple keywords are sent this will contain one text analysis result for every keyword in the same order as the keywords were sent. |+| results | [[semantic_api_v2.0#The result object|Array of nested result objects]] | The results after processing the text. If no keyword has been sent this will contain only one element. If multiple keywords are sent this will contain one text analysis result for every keyword in the same order as the keywords were sent. |
  
 === The result object === === The result object ===
Sor 120: Sor 120:
 | recognized_excludes | Array of strings | If no keyword was sent, this list will be empty. If a keyword was provided for the analysis and the keyword had excludes, this list will contain all the excludes that were found in the text. If excludes were provided and any of them was found in the text, the analysis will be skipped. | | recognized_excludes | Array of strings | If no keyword was sent, this list will be empty. If a keyword was provided for the analysis and the keyword had excludes, this list will contain all the excludes that were found in the text. If excludes were provided and any of them was found in the text, the analysis will be skipped. |
 | recognized_filters | Array of strings | If no keyword was sent, this list will be empty. If a keyword was provided for the analysis and the keyword had filters, this list will contain all the filters that were found in the text. If filters were provided but none was found, the analysis will be skipped. | | recognized_filters | Array of strings | If no keyword was sent, this list will be empty. If a keyword was provided for the analysis and the keyword had filters, this list will contain all the filters that were found in the text. If filters were provided but none was found, the analysis will be skipped. |
-| keyword_stats | [[api_textanalysis#The keyword_stats object|Nested keyword stats object]] | Contains statistics about keyword hits in the text if a keyword was provided. | +| keyword_stats | [[semantic_api_v2.0#The keyword_stats object|Nested keyword stats object]] | Contains statistics about keyword hits in the text if a keyword was provided. | 
-| recognized_negative_phrases | [[api_textanalysis#The recognized positive/​negative phrase object|Array of nested recognized negative phrase objects]] | Negative phrases recognized in the text. \\ \\ (If a keyword was provided, 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 | [[semantic_api_v2.0#The recognized positive/​negative phrase object|Array of nested recognized negative phrase objects]] | Negative phrases recognized in the text. \\ \\ (If a keyword was provided, 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 | [[api_textanalysis#The recognized positive/​negative phrase object|Array of nested recognized positive phrase objects]] | Positive phrases recognized in the text. \\ \\ (If a keyword was provided, 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 | [[semantic_api_v2.0#The recognized positive/​negative phrase object|Array of nested recognized positive phrase objects]] | Positive phrases recognized in the text. \\ \\ (If a keyword was provided, only the positive phrases related to the synonyms are recognized. If no synonyms set then every positive phrase is recognized in the text.) | 
-| entities | [[api_textanalysis#The entity object|Array of nested entity objects]] | Recognized labels and entities (topics, attributes, brands, locations, etc. \\ \\ (If keywords are sent with the request then only the labels, entities and phrases related to the provided keyword are recognized. If no keywords are sent then every label, entity and phrase is recognized in the text.) |+| entities | [[semantic_api_v2.0#The entity object|Array of nested entity objects]] | Recognized labels and entities (topics, attributes, brands, locations, etc. \\ \\ (If keywords are sent with the request then only the labels, entities and phrases related to the provided keyword are recognized. If no keywords are sent then every label, entity and phrase is recognized in the text.) |
  
 === The keyword stats object === === The keyword stats object ===
 ^Element ^ Type ^ Description ^ ^Element ^ Type ^ Description ^
 | total_keyword_hit_number | Integer | Number of how many times the provided keyword was mentioned in the input text. Every synonym hit is counted as one. If no synonym is set the result is 0. | | total_keyword_hit_number | Integer | Number of how many times the provided keyword was mentioned in the input text. Every synonym hit is counted as one. If no synonym is set the result is 0. |
-| total_synonym_hit_numbers | [[api_textanalysis#The total_synonym_hit_number object|Array of nested total synonym hit number objects]] | Detailed list of how many times each individual synonym was mentioned in the text. |+| total_synonym_hit_numbers | [[semantic_api_v2.0#The total_synonym_hit_number object|Array of nested total synonym hit number objects]] | Detailed list of how many times each individual synonym was mentioned in the text. |
  
 === The total synonym hit number object === === The total synonym hit number object ===
Sor 142: Sor 142:
 | mention_number | Integer | The number of how many times this entity was mentioned in the text. | | mention_number | Integer | The number of how many times this entity was mentioned in the text. |
 | mentions | Array of strings | The various mentions where this entity was used. | | mentions | Array of strings | The various mentions where this entity was used. |
-| related_pos_phrases | [[api_textanalysis#The related phrase object|Array of nested related phrase objects]] | Other positive phrases that are related to this entity. | +| related_pos_phrases | [[semantic_api_v2.0#The related phrase object|Array of nested related phrase objects]] | Other positive phrases that are related to this entity. | 
-| related_neg_phrases | [[api_textanalysis#The related phrase object|Array of nested related phrase objects]] | Other negative phrases that are related to this entity. | +| related_neg_phrases | [[semantic_api_v2.0#The related phrase object|Array of nested related phrase objects]] | Other negative phrases that are related to this entity. | 
-| related_entities | [[api_textanalysis#The related entity object|Array of nested related entity objects]] | Other entities that are related to this entity. |+| related_entities | [[semantic_api_v2.0#The related entity object|Array of nested related entity objects]] | Other entities that are related to this entity. |
  
 === The recognized positive/​negative phrase object === === The recognized positive/​negative phrase object ===
Sor 152: Sor 152:
 | entity_opinion_index | Double | A score that represents how positive or negative this phrase is. | | entity_opinion_index | Double | A score that represents how positive or negative this phrase is. |
 | mentions | Array of strings | The various mentions where this phrase was used. | | mentions | Array of strings | The various mentions where this phrase was used. |
-| related_pos_phrases | [[api_textanalysis#The related phrase object|Array of nested related phrase objects]] | Other positive phrases that are related to this positive or negative phrase. | +| related_pos_phrases | [[semantic_api_v2.0#The related phrase object|Array of nested related phrase objects]] | Other positive phrases that are related to this positive or negative phrase. | 
-| related_neg_phrases | [[api_textanalysis#The related phrase object|Array of nested related phrase objects]] | Other negative phrases that are related to this positive or negative phrase. | +| related_neg_phrases | [[semantic_api_v2.0#The related phrase object|Array of nested related phrase objects]] | Other negative phrases that are related to this positive or negative phrase. | 
-| related_entities | [[api_textanalysis#The related entity object|Array of nested related entity objects]] | Other entities that are related to this positive or negative phrase. |+| related_entities | [[semantic_api_v2.0#The related entity object|Array of nested related entity objects]] | Other entities that are related to this positive or negative phrase. |
  
 === The related phrase object === === The related phrase object ===
Sor 272: Sor 272:
  
 <​code>​ <​code>​
-curl --header "​Content-Type:​ application/​json"​ --request POST --data '​{"​language":"​en","​token":"​token_from_neticle","​input":"​I like this neighborhood,​ but the 4g net is terrible here.","​callid":​ "​internal system 1","​format":"​json"​,"​stem":​false,"​replaceaccent":​false,"​lowercase":​false,"​keywords":​[{"​id":​ "​net_keyword_1","​synonyms":​["​net","​Net","​NET"​],"​excludes":​["​fish","​Fish","​FISH"​],"​filters":​["​3g","​3G","​4g","​4G"​]}]}'​ https://​textanalysis.neticle.com/​2.0/​text_analysis+curl --header "​Content-Type:​ application/​json"​ --request POST --data '​{"​language":"​en","​token":"​token_from_neticle","​input":"​I like this neighborhood,​ but the 4g net is terrible here.","​callid":​ "​internal system 1","​format":"​json","​replaceaccent":​false,"​lowercase":​false,"​keywords":​[{"​id":​ "​net_keyword_1","​synonyms":​["​net","​Net","​NET"​],"​excludes":​["​fish","​Fish","​FISH"​],"​filters":​["​3g","​3G","​4g","​4G"​]}]}'​ https://​textanalysis.neticle.com/​2.0/​text_analysis
 </​code>​ </​code>​
  
Sor 329: Sor 329:
             textAnalysisApiRequest.setLowercase(false);​             textAnalysisApiRequest.setLowercase(false);​
             textAnalysisApiRequest.setReplaceaccent(false);​             textAnalysisApiRequest.setReplaceaccent(false);​
-            textAnalysisApiRequest.setStem(false);​ 
             textAnalysisApiRequest.setToken("​token_from_neticle"​);​             textAnalysisApiRequest.setToken("​token_from_neticle"​);​
             textAnalysisApiRequest.setKeywords(Arrays.asList(textAnalysisKeyword));​             textAnalysisApiRequest.setKeywords(Arrays.asList(textAnalysisKeyword));​
Sor 353: Sor 352:
         private String callid = "";​         private String callid = "";​
         private String format = "​json";​         private String format = "​json";​
-        private boolean stem = false; 
         private boolean replaceaccent = false;         private boolean replaceaccent = false;
         private boolean lowercase = false;         private boolean lowercase = false;
Sor 365: Sor 363:
         public String getInput() {return input;}         public String getInput() {return input;}
         public void setInput(String input) {this.input = input;}         public void setInput(String input) {this.input = input;}
-        public boolean isStem() {return stem;} 
-        public void setStem(boolean stem) {this.stem = stem;} 
         public boolean isReplaceaccent() {return replaceaccent;​}         public boolean isReplaceaccent() {return replaceaccent;​}
         public void setReplaceaccent(boolean replaceaccent) {this.replaceaccent = replaceaccent;​}         public void setReplaceaccent(boolean replaceaccent) {this.replaceaccent = replaceaccent;​}
Sor 416: Sor 412:
         '​callid'​ => '​internal system 1',         '​callid'​ => '​internal system 1',
         '​format'​ => '​json',​         '​format'​ => '​json',​
-        '​stem'​ => false, 
         '​replaceaccent'​ => false,         '​replaceaccent'​ => false,
         '​lowercase'​ => false,         '​lowercase'​ => false,
Sor 444: Sor 439:
   '​callid':​ '​internal system 1',   '​callid':​ '​internal system 1',
   '​format':​ '​json',​   '​format':​ '​json',​
-  '​stem':​ False, 
   '​replaceaccent':​ False,   '​replaceaccent':​ False,
   '​lowercase':​ False,   '​lowercase':​ False,
semantic_api_v2.0.1549026931.txt.gz · Utolsó módosítás: 2019/02/01 14:15 szerkesztette: zoltancsikos