{"_id":"584aeea99588370f00608ab8","version":{"_id":"584aeea89588370f00608a3b","project":"559ae8ec7ae7f80d0096d813","__v":1,"createdAt":"2016-12-09T17:49:28.502Z","releaseDate":"2016-12-09T17:49:28.502Z","categories":["584aeea89588370f00608a3c","584aeea89588370f00608a3d","584aeea89588370f00608a3e","584aeea89588370f00608a3f","584aeea89588370f00608a40","584aeea89588370f00608a41","584aeea89588370f00608a42","584aeea89588370f00608a43","584aeea89588370f00608a44","584aeea89588370f00608a45","584aeea89588370f00608a46","584aeea89588370f00608a47","584aeea89588370f00608a48","584aeea89588370f00608a49","584aeea89588370f00608a4a","584aeea89588370f00608a4b","584aeea89588370f00608a4c","584aeea89588370f00608a4d","584aeea89588370f00608a4e","584aeea89588370f00608a4f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"4.2.3","version":"4.2.3"},"category":{"_id":"584aeea89588370f00608a4e","version":"584aeea89588370f00608a3b","project":"559ae8ec7ae7f80d0096d813","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-07-07T21:29:25.650Z","from_sync":false,"order":18,"slug":"other-resources","title":"Other resources"},"parentDoc":null,"project":"559ae8ec7ae7f80d0096d813","user":"559ae88c7ae7f80d0096d812","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-07T21:30:48.022Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":103,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Detailed Mode Output\"\n}\n[/block]\nDetailed Mode performs analysis on individual documents. In the Semantria API the user can customize almost every part of the analysis; from constraining the number of results for each category to defining the parts of speech which the server will detect, the user can configure Detailed Mode to suit your needs in document sentiment analysis. In this section, we provide a quick reference for customizable options and parameters for POS tagging, as well as a detailed explanation of Detailed Mode's output.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Our fully functional [API Console](https://semantria.com/developer/api-console) offers more explanations and a chance to play with the Semantria API in a browser.\",\n  \"title\": \"API Console\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Line-by-line Term Explanation\"\n}\n[/block]\nThis output is from analyzing the text below. However, it has been abbreviated for clarity.\n\nGoogle Inc. is an American multinational not public corporation invested in Internet search, cloud computing, and advertising technologies. Google hosts and develops a number of Internet-based services and products, and generates profit primarily from advertising through its AdWords program. The company was founded by Larry Page and Sergey Brin, often dubbed the \"Google Guys\", while the two were attending Stanford University as PhD candidates.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n#This array shows all auto categories found in the text\\n    \\\"auto_categories\\\": [\\n        {\\n#This is the relevance score for the auto category \\n            \\\"strength_score\\\": 0.51434803, \\n#This is the title of the auto category\\n            \\\"title\\\": \\\"IT\\\", \\n#This is the type of auto category - node for a category that can contain other categories, leaf for categories at the end of the tree\\n            \\\"type\\\": \\\"node\\\"\\n        }\\n    ], \\n#This is the ID of the config used to process the data\\n    \\\"config_id\\\": \\\"ed7b6405-2bc2-443d-b6c4-0feab9050c5d\\\", \\n#This array gives the detailes of the document. Each element in the array is a sentence. Only a single sentence is given here due to length.\\n    \\\"details\\\": [\\n        {\\n#If the sentence is imperative or not\\n            \\\"is_imperative\\\": false, \\n#If the sentence should carry sentiment\\n            \\\"is_polar\\\": true, \\n#This array lists all of the wordsin the sentence\\n            \\\"words\\\": [\\n                {\\n#Was the word negated via not or other negator\\n                    \\\"is_negated\\\": false, \\n#Sentiment score for the word\\n                    \\\"sentiment_score\\\": 0.0,\\n#Stemmed form of the word\\n                    \\\"stemmed\\\": \\\"google\\\",\\n#Part of speech tag. NNP is a proper noun\\n                    \\\"tag\\\": \\\"NNP\\\",\\n#Actual word\\n                    \\\"title\\\": \\\"Google\\\",\\n#Normalized part of speech tag. Proper nouns are types of nouns\\n                    \\\"type\\\": \\\"Noun\\\"\\n                },\\n#Many more words and sentences omitted\\n            ]\\n        }, \\n    ], \\n#The entities array lists all entities found.\\n    \\\"entities\\\": [\\n        {\\n #Did the entity match the optional confidence query\\n            \\\"confident\\\": true, \\n #What type of entity is it\\n            \\\"entity_type\\\": \\\"Company\\\",\\n #How much sentiment evidence is there?\\n            \\\"evidence\\\": 5, \\n #Was this entity a focus of the text?\\n            \\\"is_about\\\": true, \\n #The label. This can be overridden in user-defined entities.\\n            \\\"label\\\": \\\"Company\\\", \\n #Array of actual mentions of the entity.\\n            \\\"mentions\\\": [\\n                {\\n #Was the entity negated?\\n                    \\\"is_negated\\\": false, \\n #Actual word found in text.\\n                    \\\"label\\\": \\\"Google Inc.\\\",\\n #Locations info can be ued for hit-highlighting.\\n                    \\\"locations\\\": [\\n                        {\\n #Length of the string\\n                            \\\"length\\\": 11, \\n #Zero-based position of the actual string\\n                            \\\"offset\\\": 0\\n                        }\\n                    ]\\n                }, \\n                {\\n                    \\\"is_negated\\\": false, \\n#Note different actual string in text than the first mention\\n                    \\\"label\\\": \\\"Google\\\", \\n                    \\\"locations\\\": [\\n                        {\\n                            \\\"length\\\": 6, \\n                            \\\"offset\\\": 140\\n                        }\\n                    ]\\n                }\\n            ], \\n#Sentiment for the entity in words\\n            \\\"sentiment_polarity\\\": \\\"neutral\\\", \\n#Sentiment for the entity as a float\\n            \\\"sentiment_score\\\": -0.122652, \\n#Themes associated with the entity\\n            \\\"themes\\\": [\\n                {\\n#Amount of sentiment evidence for this theme\\n                    \\\"evidence\\\": 4,\\n#Is this theme a focus of the text?\\n                    \\\"is_about\\\": false, \\n#Array of actual mentions of the theme.\\n                    \\\"mentions\\\": [\\n                        {\\n                            \\\"is_negated\\\": true, \\n                            \\\"label\\\": \\\"public corporation\\\", \\n                            \\\"locations\\\": [\\n                                {\\n                                    \\\"length\\\": 18, \\n                                    \\\"offset\\\": 45\\n                                }\\n                            ], \\n#If an object is negated, the negating phrase\\n                            \\\"negating_phrase\\\": \\\"not\\\"\\n                        }\\n                    ], \\n#Normalized (lower-cased stemmed) version of the theme\\n                    \\\"normalized\\\": \\\"public corporate\\\",\\n#sentiment for the theme in words\\n                    \\\"sentiment_polarity\\\": \\\"neutral\\\",\\n#Sentiment for the theme in a float\\n                    \\\"sentiment_score\\\": -0.122652,\\n#Stemmed version of the theme\\n                    \\\"stemmed\\\": \\\"public corporate\\\",\\n#Relevancy of the theme to the entity\\n                    \\\"strength_score\\\": 1.0,\\n#Actual words of the theme\\n                    \\\"title\\\": \\\"public corporation\\\"\\n                }, \\n#More themes omitted\\n            ], \\n#Entity name\\n            \\\"title\\\": \\\"Google\\\",\\n#Named entities are automatically-discovered, user entities are defined\\n            \\\"type\\\": \\\"named\\\"\\n        }, \\n#More entities omitted for clarity\\n    ],\\n#The relations array lists the relationships found in the text\\n\\\"relations\\\": [\\n      {\\n#Named relations are auto-discovered\\n        \\\"type\\\": \\\"named\\\",\\n#the words triggering the relationship\\n        \\\"extra\\\": \\\"said\\\",\\n#The entities involved in the relationship\\n        \\\"entities\\\": [\\n          {\\n            \\\"title\\\": \\\"Sergey Brin\\\",\\n            \\\"entity_type\\\": \\\"Person\\\"\\n          },\\n          {\\n            \\\"title\\\": \\\"\\\\\\\"Google is marching ahead\\\\\\\"\\\",\\n            \\\"entity_type\\\": \\\"Quote\\\"\\n          }\\n        ],\\n#Type of relationship\\n        \\\"relation_type\\\": \\\"Quotation\\\",\\n        \\\"confidence_score\\\": 1\\n      }\\n    ],\\n#ID of the document \\n    \\\"id\\\": \\\"55fc6ebd-0001\\\",\\n#Language of document\\n    \\\"language\\\": \\\"English\\\", \\n#Confidence in the language\\n    \\\"language_score\\\": 0.38016528,\\n#Metadata contains metadata you passed to Semantria\\n    \\\"metadata\\\": {\\n        \\\"circulation\\\": 25, \\n        \\\"date\\\": \\\"20160325\\\"\\n    }, \\n#This dictionary lists the model-based sentiment scores\\n    \\\"model_sentiment\\\": {\\n#likelihood the document had a mixed sentiment score\\n        \\\"mixed_score\\\": 0.06166500225663185, \\n#Model name. Semantria ships with a default model.\\n        \\\"model_name\\\": \\\"default\\\", \\n#Likelihood the document had a negative score\\n        \\\"negative_score\\\": 0.09528054296970367,\\n#Likelihood the document had a neutral score\\n        \\\"neutral_score\\\": 0.6886150240898132,\\n#Likelihood the document had a neutral score\\n        \\\"positive_score\\\": 0.15443940460681915,\\n#Most likely sentiment polarity in words\\n        \\\"sentiment_polarity\\\": \\\"neutral\\\"\\n    }, \\n#This array lists all sentiment phrases found in the text.\\n    \\\"phrases\\\": { \\n        {\\n#Whether the phrase was intensified\\n            \\\"is_intensified\\\": false, \\n#Whether the phrase was negated\\n            \\\"is_negated\\\": false,\\n#length of phrase in bytes\\n      \\t\\t\\t\\\"length\\\" : 8,\\n#beginning position of phrase in bytes\\n      \\t\\t\\t\\\"offset\\\" : 362,\\n#Phrase sentiment in words\\n            \\\"sentiment_polarity\\\": \\\"negative\\\",\\n#Phrase sentiment in float\\n            \\\"sentiment_score\\\": -0.4,\\n#Actual phrase      \\n            \\\"title\\\": \\\"so wrong\\\",\\n#Whether detected or possible\\n            \\\"type\\\": \\\"detected\\\"\\n        }, \\n        {\\n            \\\"sentiment_polarity\\\": \\\"neutral\\\", \\n            \\\"title\\\": \\\"American multinational\\\",\\n#Semantria's suggestions of possible sentiment phrases to add to custom configuration\\n            \\\"type\\\": \\\"possible\\\"\\n        }, \\n#More phrases omitted for clarity.\\n    ],\\n#Sentiment of document in words\\n    \\\"sentiment_polarity\\\": \\\"neutral\\\",\\n#Sentiment of document as float\\n    \\\"sentiment_score\\\": 0.120261446,\\n#Semantria status of document.\\n    \\\"status\\\": \\\"PROCESSED\\\",\\n#Tag we submitted with document\\n\\t\\t\\\"tag\\\": \\\"Google analysis\\\",\\n#Summary of document\\n    \\\"summary\\\": \\\"Google Inc. is an American multinational not public corporation invested in Internet search, cloud computing, and advertising technologies... Google hosts and develops a number of Internet-based services and products, and generates profit primarily from advertising through its AdWords program... \\\",\\n#Array of themes relevant at a document level\\n    \\\"themes\\\": [\\n        {\\n            \\\"evidence\\\": 4, \\n            \\\"is_about\\\": true, \\n            \\\"mentions\\\": [\\n                {\\n                    \\\"is_negated\\\": true, \\n                    \\\"label\\\": \\\"public corporation\\\", \\n                    \\\"locations\\\": [\\n                        {\\n                            \\\"length\\\": 18, \\n                            \\\"offset\\\": 45\\n                        }\\n                    ], \\n                    \\\"negating_phrase\\\": \\\"not\\\"\\n                }\\n            ], \\n            \\\"normalized\\\": \\\"public corporate\\\", \\n            \\\"sentiment_polarity\\\": \\\"neutral\\\", \\n            \\\"sentiment_score\\\": -0.122652, \\n            \\\"stemmed\\\": \\\"public corporate\\\", \\n            \\\"strength_score\\\": 1.0, \\n            \\\"title\\\": \\\"public corporation\\\"\\n        }\\n#More themes omitted for clarity.     \\n    ], \\n#This array lists topics discovered in text\\n    \\\"topics\\\": [\\n        {\\n#The number of query terms that hit in the document\\n            \\\"hitcount\\\": 4,\\n#The ID of the query\\n            \\\"id\\\": \\\"cb9b40e7-f663-4120-8db4-4b4f0689c63e\\\",\\n#An array listing the term hits\\n            \\\"mentions\\\": [\\n                {\\n#Whether the term was negated\\n                    \\\"is_negated\\\": false,\\n#The term that hit\\n                    \\\"label\\\": \\\"catalog\\\",\\n#An array of locations of the term\\n                    \\\"locations\\\": [\\n                        {\\n#The length in bytes of the term\\n                            \\\"length\\\": 7,\\n#The offset in bytes from the beginning of the document for the hit\\n                            \\\"offset\\\": 15\\n                        },\\n                        {\\n                            \\\"length\\\": 7,\\n                            \\\"offset\\\": 505\\n                        }\\n                    ]\\n                },\\n                {\\n                    \\\"is_negated\\\": false,\\n                    \\\"label\\\": \\\"toy\\\",\\n                    \\\"locations\\\": [\\n                        {\\n                            \\\"length\\\": 3,\\n                            \\\"offset\\\": 11\\n                        },\\n                        {\\n                            \\\"length\\\": 3,\\n                            \\\"offset\\\": 296\\n                        }\\n                    ]\\n                }\\n            ],\\n#Array of sentiment phrases associated with the query\\n            \\\"sentiment_phrases\\\": [\\n                {\\n                    \\\"modified\\\": 0,\\n                    \\\"phrase\\\": {\\n#Length of the phrase in bytes\\n                        \\\"byte_length\\\": 4,\\n#Beginning of the phrase\\n                        \\\"byte_offset\\\": 137,\\n#Zero-based index of Document in a collection\\n                        \\\"document\\\": 0,\\n#Length of the phrase in words\\n                        \\\"length\\\": 1,\\n#Was the phrase negated?\\n                        \\\"negated\\\": false,\\n#Actual Phrase\\n                        \\\"phrase\\\": \\\"easy\\\",\\n#Reserved for future use\\n                        \\\"section\\\": 0,\\n#Sentence of the document the phrase appears. in\\n                        \\\"sentence\\\": 3,\\n#Whether the phrase is negated, intensified, both, or none\\n                        \\\"type\\\": \\\"none\\\",\\n#zero-based index of the first word in the phrase\\n                        \\\"word\\\": 3\\n                    },\\n#Sentiment score of the phrase\\n                    \\\"score\\\": 0.49,\\n#Dictionary or user phrase\\n                    \\\"type\\\": 1\\n                },\\n#An example of a modified sentiment phrase:\\n                {\\n#indicates the sentiment phrase was modified\\n                    \\\"modified\\\": 2,\\n                    \\\"phrase\\\": {\\n                        \\\"byte_length\\\": 5,\\n                        \\\"byte_offset\\\": 37,\\n                        \\\"document\\\": 0,\\n                        \\\"length\\\": 2,\\n                        \\\"is_negated\\\": false,\\n                        \\\"section\\\": 0,\\n                        \\\"sentence\\\": 1,\\n                        \\\"title\\\": \\\"liked\\\",\\n                        \\\"type\\\": 2,\\n                        \\\"word\\\": 2\\n                    },\\n                    \\\"score\\\": 0.6236333,\\n#List of tokens that modified the sentiment phrase\\n                    \\\"supporting_phrases\\\": [\\n                        {\\n                            \\\"byte_length\\\": 4,\\n                            \\\"byte_offset\\\": 32,\\n                            \\\"document\\\": 0,\\n                            \\\"length\\\": 1,\\n                            \\\"is_negated\\\": false,\\n                            \\\"section\\\": 0,\\n                            \\\"sentence\\\": 1,\\n                            \\\"title\\\": \\\"also\\\",\\n                            \\\"type\\\": 0,\\n                            \\\"word\\\": 1\\n                        }\\n                    ],\\n                    \\\"type\\\": 1\\n                }              \\n            ],\\n#The sentiment polarity of the query\\n            \\\"sentiment_polarity\\\": \\\"neutral\\\",\\n#The sentiment score of the query as a float\\n            \\\"sentiment_score\\\": 0.43459997,\\n#The name of the query\\n            \\\"title\\\": \\\"toys\\\",\\n#The type of query\\n            \\\"type\\\": \\\"query\\\"\\n        }\\n    ]\\n\\n        {\\n#Not used for concept topics          \\n            \\\"hitcount\\\": 0,\\n            \\\"sentiment_polarity\\\": \\\"neutral\\\", \\n            \\\"sentiment_score\\\": 0.120261446,\\n#Relevancy of topic to document          \\n            \\\"strength_score\\\": 0.55242544,\\n#Name of topic          \\n            \\\"title\\\": \\\"Advertising\\\", \\n            \\\"type\\\": \\\"concept\\\"\\n        }\\n#More topics omitted for clarity\\n    ]\\n}\\n\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nDetailed mode limits apply to both document mode and source mode of analysis. All limits have integer values of 0 to 20. Setting a limit to a score of 0 signifies zero interest in the output and will prevent the result for that parameter from appearing in the dataset.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Detailed Mode output explanation\"\n}\n[/block]\nSemantria provides the user with a wealth of information in its sentiment analysis and data processing; sometimes it can be kind of hard to wade through. Here is a quick reference detailing everything the Semantria API will return to the user in Detailed Analysis Mode.\n\nEach document will have an *id* and each configuration has a unique *config_id*. The user can add *tags* and view the *status* of the document (\"queued,\" \"processed\" or \"failed\"). Semantria API will produce a *job_id* of the associated job, a *summary* of the document text, the *language* of the source text (and the *language score*, the percentage of the best language match among detected languages), and the *sentiment_score* and *sentiment_polarity*. \n\nIn detailed analysis of individual sentences, the API will return boolean values for *is_imperative* and *is_polar*. Imperative sentences, representing a action item, will be set to true. is_polar represents Semantria's guess as to whether the writer of the sentence meant to convey sentiment. For instance, \"Good morning all\" is a non-polar sentence despite containing a sentiment word of \"good.\"\n\nThe API will return a list of words grouped by the parent sentence. Each word will have a *tag*, POS *type*,* title*, *stemmed* form of the word, and *sentiment_score*.\n\nSemantria API will generate *auto_categories*; each category will have a* title*,* type* (\"node\"/root or \"leaf\"/nested value), *strength_score* (how much the category matches with document content), and *categories*, a list of sub-categories (if any exist).\n\n*phrases* are a list of sentiment-bearing phrases from the document. Each will have a *title, sentiment_score, sentiment_polarity* (negative, positive, or neutral),* is_negated* (whether the phrase has been negated), *negating_phrase* (if one exists),* is_intensified, intensifying_phrase* (if one exists), and *type* (either \"possible\" or \"detected\").\n\nThe Semantria API returns the *themes* of the document. Each has the *title*, main theme (*is_about*), the *normalized* form of the theme, the *stemmed* form of the theme, an *evidence* score, *strength_score* within the document, and *sentiment_polarity*. The API will return *mentions* of the theme: *expandable*, which is the text of the theme mention, *is_negated, negating_phrase*, and* locations*-- the list of coordinates of the mentions found within the document. *offset* is the number of bytes offset in the original text before the start of the mention, and *length* is the length of the mention in bytes.\n\nThe API returns entities with similar parameters to themes. Entities have additional parameters of *type* (either \"named\" or \"user\"),* confident* (whether the confidence queries matched for this entity), and the *entity_type* (Company, Person, Place, etc.). It will also return a list of themes related to this entity.\n\nSemantria API returns relations, which represent a connection between one or more Entities. These have a *type* (named or user value), *relation_type* (such as quotation), *confidence_score,  and extra* of the parent relationship.\n\nThe API will also return a list of opinions extracted from the source text. Each will have a *quotation, type* (the type of entity extracted-- named or user value), *speaker, topic, sentiment_score* and *sentiment_polarity*.\n\nFinally, Semantria API gives a list of topics, each with a *title, type, hitcount, strength_score, sentiment_score, sentiment_score* and* topics* (a list of sub-topics, if they exist).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"API Options\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Option\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Default\",\n    \"0-0\": \"auto_response\",\n    \"1-0\": \"is_primary\",\n    \"2-0\": \"chars_threshold\",\n    \"3-0\": \"one_sentence\",\n    \"4-0\": \"process_html\",\n    \"5-0\": \"language\",\n    \"6-0\": \"callback\",\n    \"0-2\": \"False\",\n    \"1-2\": \"False\",\n    \"2-2\": \"80\",\n    \"3-2\": \"False\",\n    \"4-2\": \"False\",\n    \"5-2\": \"English\",\n    \"6-2\": \"Empty\",\n    \"6-1\": \"Defines a callback URL for automatic data responding (more info).\",\n    \"5-1\": \"Defines target language that will be used for task processing.\",\n    \"4-1\": \"Leads the service to clean HTML tags before processing.\",\n    \"3-1\": \"Leads the service to clean HTML tags before processing.\",\n    \"2-1\": \"Defines whether or not the service should respond with processed results on each incoming analytics document or discovery mode request.\",\n    \"1-1\": \"Identifies whether the current configuration is primary or not.\",\n    \"0-1\": \"Defines whether or not the service should respond with processed results on each incoming analytics document or discovery analysis request (more info).\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]","excerpt":"","slug":"output","type":"basic","title":"Detailed API Output Explanation"}

Detailed API Output Explanation


[block:api-header] { "type": "basic", "title": "Detailed Mode Output" } [/block] Detailed Mode performs analysis on individual documents. In the Semantria API the user can customize almost every part of the analysis; from constraining the number of results for each category to defining the parts of speech which the server will detect, the user can configure Detailed Mode to suit your needs in document sentiment analysis. In this section, we provide a quick reference for customizable options and parameters for POS tagging, as well as a detailed explanation of Detailed Mode's output. [block:callout] { "type": "info", "body": "Our fully functional [API Console](https://semantria.com/developer/api-console) offers more explanations and a chance to play with the Semantria API in a browser.", "title": "API Console" } [/block] [block:api-header] { "type": "basic", "title": "Line-by-line Term Explanation" } [/block] This output is from analyzing the text below. However, it has been abbreviated for clarity. Google Inc. is an American multinational not public corporation invested in Internet search, cloud computing, and advertising technologies. Google hosts and develops a number of Internet-based services and products, and generates profit primarily from advertising through its AdWords program. The company was founded by Larry Page and Sergey Brin, often dubbed the "Google Guys", while the two were attending Stanford University as PhD candidates. [block:code] { "codes": [ { "code": "{\n#This array shows all auto categories found in the text\n \"auto_categories\": [\n {\n#This is the relevance score for the auto category \n \"strength_score\": 0.51434803, \n#This is the title of the auto category\n \"title\": \"IT\", \n#This is the type of auto category - node for a category that can contain other categories, leaf for categories at the end of the tree\n \"type\": \"node\"\n }\n ], \n#This is the ID of the config used to process the data\n \"config_id\": \"ed7b6405-2bc2-443d-b6c4-0feab9050c5d\", \n#This array gives the detailes of the document. Each element in the array is a sentence. Only a single sentence is given here due to length.\n \"details\": [\n {\n#If the sentence is imperative or not\n \"is_imperative\": false, \n#If the sentence should carry sentiment\n \"is_polar\": true, \n#This array lists all of the wordsin the sentence\n \"words\": [\n {\n#Was the word negated via not or other negator\n \"is_negated\": false, \n#Sentiment score for the word\n \"sentiment_score\": 0.0,\n#Stemmed form of the word\n \"stemmed\": \"google\",\n#Part of speech tag. NNP is a proper noun\n \"tag\": \"NNP\",\n#Actual word\n \"title\": \"Google\",\n#Normalized part of speech tag. Proper nouns are types of nouns\n \"type\": \"Noun\"\n },\n#Many more words and sentences omitted\n ]\n }, \n ], \n#The entities array lists all entities found.\n \"entities\": [\n {\n #Did the entity match the optional confidence query\n \"confident\": true, \n #What type of entity is it\n \"entity_type\": \"Company\",\n #How much sentiment evidence is there?\n \"evidence\": 5, \n #Was this entity a focus of the text?\n \"is_about\": true, \n #The label. This can be overridden in user-defined entities.\n \"label\": \"Company\", \n #Array of actual mentions of the entity.\n \"mentions\": [\n {\n #Was the entity negated?\n \"is_negated\": false, \n #Actual word found in text.\n \"label\": \"Google Inc.\",\n #Locations info can be ued for hit-highlighting.\n \"locations\": [\n {\n #Length of the string\n \"length\": 11, \n #Zero-based position of the actual string\n \"offset\": 0\n }\n ]\n }, \n {\n \"is_negated\": false, \n#Note different actual string in text than the first mention\n \"label\": \"Google\", \n \"locations\": [\n {\n \"length\": 6, \n \"offset\": 140\n }\n ]\n }\n ], \n#Sentiment for the entity in words\n \"sentiment_polarity\": \"neutral\", \n#Sentiment for the entity as a float\n \"sentiment_score\": -0.122652, \n#Themes associated with the entity\n \"themes\": [\n {\n#Amount of sentiment evidence for this theme\n \"evidence\": 4,\n#Is this theme a focus of the text?\n \"is_about\": false, \n#Array of actual mentions of the theme.\n \"mentions\": [\n {\n \"is_negated\": true, \n \"label\": \"public corporation\", \n \"locations\": [\n {\n \"length\": 18, \n \"offset\": 45\n }\n ], \n#If an object is negated, the negating phrase\n \"negating_phrase\": \"not\"\n }\n ], \n#Normalized (lower-cased stemmed) version of the theme\n \"normalized\": \"public corporate\",\n#sentiment for the theme in words\n \"sentiment_polarity\": \"neutral\",\n#Sentiment for the theme in a float\n \"sentiment_score\": -0.122652,\n#Stemmed version of the theme\n \"stemmed\": \"public corporate\",\n#Relevancy of the theme to the entity\n \"strength_score\": 1.0,\n#Actual words of the theme\n \"title\": \"public corporation\"\n }, \n#More themes omitted\n ], \n#Entity name\n \"title\": \"Google\",\n#Named entities are automatically-discovered, user entities are defined\n \"type\": \"named\"\n }, \n#More entities omitted for clarity\n ],\n#The relations array lists the relationships found in the text\n\"relations\": [\n {\n#Named relations are auto-discovered\n \"type\": \"named\",\n#the words triggering the relationship\n \"extra\": \"said\",\n#The entities involved in the relationship\n \"entities\": [\n {\n \"title\": \"Sergey Brin\",\n \"entity_type\": \"Person\"\n },\n {\n \"title\": \"\\\"Google is marching ahead\\\"\",\n \"entity_type\": \"Quote\"\n }\n ],\n#Type of relationship\n \"relation_type\": \"Quotation\",\n \"confidence_score\": 1\n }\n ],\n#ID of the document \n \"id\": \"55fc6ebd-0001\",\n#Language of document\n \"language\": \"English\", \n#Confidence in the language\n \"language_score\": 0.38016528,\n#Metadata contains metadata you passed to Semantria\n \"metadata\": {\n \"circulation\": 25, \n \"date\": \"20160325\"\n }, \n#This dictionary lists the model-based sentiment scores\n \"model_sentiment\": {\n#likelihood the document had a mixed sentiment score\n \"mixed_score\": 0.06166500225663185, \n#Model name. Semantria ships with a default model.\n \"model_name\": \"default\", \n#Likelihood the document had a negative score\n \"negative_score\": 0.09528054296970367,\n#Likelihood the document had a neutral score\n \"neutral_score\": 0.6886150240898132,\n#Likelihood the document had a neutral score\n \"positive_score\": 0.15443940460681915,\n#Most likely sentiment polarity in words\n \"sentiment_polarity\": \"neutral\"\n }, \n#This array lists all sentiment phrases found in the text.\n \"phrases\": { \n {\n#Whether the phrase was intensified\n \"is_intensified\": false, \n#Whether the phrase was negated\n \"is_negated\": false,\n#length of phrase in bytes\n \t\t\t\"length\" : 8,\n#beginning position of phrase in bytes\n \t\t\t\"offset\" : 362,\n#Phrase sentiment in words\n \"sentiment_polarity\": \"negative\",\n#Phrase sentiment in float\n \"sentiment_score\": -0.4,\n#Actual phrase \n \"title\": \"so wrong\",\n#Whether detected or possible\n \"type\": \"detected\"\n }, \n {\n \"sentiment_polarity\": \"neutral\", \n \"title\": \"American multinational\",\n#Semantria's suggestions of possible sentiment phrases to add to custom configuration\n \"type\": \"possible\"\n }, \n#More phrases omitted for clarity.\n ],\n#Sentiment of document in words\n \"sentiment_polarity\": \"neutral\",\n#Sentiment of document as float\n \"sentiment_score\": 0.120261446,\n#Semantria status of document.\n \"status\": \"PROCESSED\",\n#Tag we submitted with document\n\t\t\"tag\": \"Google analysis\",\n#Summary of document\n \"summary\": \"Google Inc. is an American multinational not public corporation invested in Internet search, cloud computing, and advertising technologies... Google hosts and develops a number of Internet-based services and products, and generates profit primarily from advertising through its AdWords program... \",\n#Array of themes relevant at a document level\n \"themes\": [\n {\n \"evidence\": 4, \n \"is_about\": true, \n \"mentions\": [\n {\n \"is_negated\": true, \n \"label\": \"public corporation\", \n \"locations\": [\n {\n \"length\": 18, \n \"offset\": 45\n }\n ], \n \"negating_phrase\": \"not\"\n }\n ], \n \"normalized\": \"public corporate\", \n \"sentiment_polarity\": \"neutral\", \n \"sentiment_score\": -0.122652, \n \"stemmed\": \"public corporate\", \n \"strength_score\": 1.0, \n \"title\": \"public corporation\"\n }\n#More themes omitted for clarity. \n ], \n#This array lists topics discovered in text\n \"topics\": [\n {\n#The number of query terms that hit in the document\n \"hitcount\": 4,\n#The ID of the query\n \"id\": \"cb9b40e7-f663-4120-8db4-4b4f0689c63e\",\n#An array listing the term hits\n \"mentions\": [\n {\n#Whether the term was negated\n \"is_negated\": false,\n#The term that hit\n \"label\": \"catalog\",\n#An array of locations of the term\n \"locations\": [\n {\n#The length in bytes of the term\n \"length\": 7,\n#The offset in bytes from the beginning of the document for the hit\n \"offset\": 15\n },\n {\n \"length\": 7,\n \"offset\": 505\n }\n ]\n },\n {\n \"is_negated\": false,\n \"label\": \"toy\",\n \"locations\": [\n {\n \"length\": 3,\n \"offset\": 11\n },\n {\n \"length\": 3,\n \"offset\": 296\n }\n ]\n }\n ],\n#Array of sentiment phrases associated with the query\n \"sentiment_phrases\": [\n {\n \"modified\": 0,\n \"phrase\": {\n#Length of the phrase in bytes\n \"byte_length\": 4,\n#Beginning of the phrase\n \"byte_offset\": 137,\n#Zero-based index of Document in a collection\n \"document\": 0,\n#Length of the phrase in words\n \"length\": 1,\n#Was the phrase negated?\n \"negated\": false,\n#Actual Phrase\n \"phrase\": \"easy\",\n#Reserved for future use\n \"section\": 0,\n#Sentence of the document the phrase appears. in\n \"sentence\": 3,\n#Whether the phrase is negated, intensified, both, or none\n \"type\": \"none\",\n#zero-based index of the first word in the phrase\n \"word\": 3\n },\n#Sentiment score of the phrase\n \"score\": 0.49,\n#Dictionary or user phrase\n \"type\": 1\n },\n#An example of a modified sentiment phrase:\n {\n#indicates the sentiment phrase was modified\n \"modified\": 2,\n \"phrase\": {\n \"byte_length\": 5,\n \"byte_offset\": 37,\n \"document\": 0,\n \"length\": 2,\n \"is_negated\": false,\n \"section\": 0,\n \"sentence\": 1,\n \"title\": \"liked\",\n \"type\": 2,\n \"word\": 2\n },\n \"score\": 0.6236333,\n#List of tokens that modified the sentiment phrase\n \"supporting_phrases\": [\n {\n \"byte_length\": 4,\n \"byte_offset\": 32,\n \"document\": 0,\n \"length\": 1,\n \"is_negated\": false,\n \"section\": 0,\n \"sentence\": 1,\n \"title\": \"also\",\n \"type\": 0,\n \"word\": 1\n }\n ],\n \"type\": 1\n } \n ],\n#The sentiment polarity of the query\n \"sentiment_polarity\": \"neutral\",\n#The sentiment score of the query as a float\n \"sentiment_score\": 0.43459997,\n#The name of the query\n \"title\": \"toys\",\n#The type of query\n \"type\": \"query\"\n }\n ]\n\n {\n#Not used for concept topics \n \"hitcount\": 0,\n \"sentiment_polarity\": \"neutral\", \n \"sentiment_score\": 0.120261446,\n#Relevancy of topic to document \n \"strength_score\": 0.55242544,\n#Name of topic \n \"title\": \"Advertising\", \n \"type\": \"concept\"\n }\n#More topics omitted for clarity\n ]\n}\n\n", "language": "json" } ] } [/block] Detailed mode limits apply to both document mode and source mode of analysis. All limits have integer values of 0 to 20. Setting a limit to a score of 0 signifies zero interest in the output and will prevent the result for that parameter from appearing in the dataset. [block:api-header] { "type": "basic", "title": "Detailed Mode output explanation" } [/block] Semantria provides the user with a wealth of information in its sentiment analysis and data processing; sometimes it can be kind of hard to wade through. Here is a quick reference detailing everything the Semantria API will return to the user in Detailed Analysis Mode. Each document will have an *id* and each configuration has a unique *config_id*. The user can add *tags* and view the *status* of the document ("queued," "processed" or "failed"). Semantria API will produce a *job_id* of the associated job, a *summary* of the document text, the *language* of the source text (and the *language score*, the percentage of the best language match among detected languages), and the *sentiment_score* and *sentiment_polarity*. In detailed analysis of individual sentences, the API will return boolean values for *is_imperative* and *is_polar*. Imperative sentences, representing a action item, will be set to true. is_polar represents Semantria's guess as to whether the writer of the sentence meant to convey sentiment. For instance, "Good morning all" is a non-polar sentence despite containing a sentiment word of "good." The API will return a list of words grouped by the parent sentence. Each word will have a *tag*, POS *type*,* title*, *stemmed* form of the word, and *sentiment_score*. Semantria API will generate *auto_categories*; each category will have a* title*,* type* ("node"/root or "leaf"/nested value), *strength_score* (how much the category matches with document content), and *categories*, a list of sub-categories (if any exist). *phrases* are a list of sentiment-bearing phrases from the document. Each will have a *title, sentiment_score, sentiment_polarity* (negative, positive, or neutral),* is_negated* (whether the phrase has been negated), *negating_phrase* (if one exists),* is_intensified, intensifying_phrase* (if one exists), and *type* (either "possible" or "detected"). The Semantria API returns the *themes* of the document. Each has the *title*, main theme (*is_about*), the *normalized* form of the theme, the *stemmed* form of the theme, an *evidence* score, *strength_score* within the document, and *sentiment_polarity*. The API will return *mentions* of the theme: *expandable*, which is the text of the theme mention, *is_negated, negating_phrase*, and* locations*-- the list of coordinates of the mentions found within the document. *offset* is the number of bytes offset in the original text before the start of the mention, and *length* is the length of the mention in bytes. The API returns entities with similar parameters to themes. Entities have additional parameters of *type* (either "named" or "user"),* confident* (whether the confidence queries matched for this entity), and the *entity_type* (Company, Person, Place, etc.). It will also return a list of themes related to this entity. Semantria API returns relations, which represent a connection between one or more Entities. These have a *type* (named or user value), *relation_type* (such as quotation), *confidence_score, and extra* of the parent relationship. The API will also return a list of opinions extracted from the source text. Each will have a *quotation, type* (the type of entity extracted-- named or user value), *speaker, topic, sentiment_score* and *sentiment_polarity*. Finally, Semantria API gives a list of topics, each with a *title, type, hitcount, strength_score, sentiment_score, sentiment_score* and* topics* (a list of sub-topics, if they exist). [block:api-header] { "type": "basic", "title": "API Options" } [/block] [block:parameters] { "data": { "h-0": "Option", "h-1": "Description", "h-2": "Default", "0-0": "auto_response", "1-0": "is_primary", "2-0": "chars_threshold", "3-0": "one_sentence", "4-0": "process_html", "5-0": "language", "6-0": "callback", "0-2": "False", "1-2": "False", "2-2": "80", "3-2": "False", "4-2": "False", "5-2": "English", "6-2": "Empty", "6-1": "Defines a callback URL for automatic data responding (more info).", "5-1": "Defines target language that will be used for task processing.", "4-1": "Leads the service to clean HTML tags before processing.", "3-1": "Leads the service to clean HTML tags before processing.", "2-1": "Defines whether or not the service should respond with processed results on each incoming analytics document or discovery mode request.", "1-1": "Identifies whether the current configuration is primary or not.", "0-1": "Defines whether or not the service should respond with processed results on each incoming analytics document or discovery analysis request (more info)." }, "cols": 3, "rows": 7 } [/block]