on develop help sign in
Updating language service definition
commiteafd68659481909abd4d717e032053a682721165 authorBrendan Hay <brendan.g.hay@gmail.com> dateSat 11 Feb 2017, 11:26 (10 years ago) parent2d792a6
1 file changed+348−8
gen/model/language/v1beta1/language-api.json+348−8
gen/model/language/v1beta1/language-api.json+348−8
@@ -33,6 +33,24 @@
3333 "https://www.googleapis.com/auth/cloud-platform"
3434 ]
3535 },
36+ "analyzeSyntax": {
37+ "id": "language.documents.analyzeSyntax",
38+ "response": {
39+ "$ref": "AnalyzeSyntaxResponse"
40+ },
41+ "parameterOrder": [],
42+ "description": "Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.",
43+ "request": {
44+ "$ref": "AnalyzeSyntaxRequest"
45+ },
46+ "flatPath": "v1beta1/documents:analyzeSyntax",
47+ "httpMethod": "POST",
48+ "parameters": {},
49+ "path": "v1beta1/documents:analyzeSyntax",
50+ "scopes": [
51+ "https://www.googleapis.com/auth/cloud-platform"
52+ ]
53+ },
3654 "annotateText": {
3755 "id": "language.documents.annotateText",
3856 "response": {
@@ -78,11 +96,11 @@
7896 "type": "object",
7997 "properties": {
8098 "language": {
81− "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n**Current Language Restrictions:**\n\n * Only English, Spanish, and Japanese textual content\n are supported, with the following additional restriction:\n * `analyzeSentiment` only supports English text.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.",
99+ "description": "The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.\u003cbr\u003e\n**Current Language Restrictions:**\n\n * Only English, Spanish, and Japanese textual content are supported.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.",
82100 "type": "string"
83101 },
84102 "gcsContentUri": {
85− "description": "The Google Cloud Storage URI where the file content is located.",
103+ "description": "The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.",
86104 "type": "string"
87105 },
88106 "type": {
@@ -183,6 +201,20 @@
183201 "text": {
184202 "description": "The mention text.",
185203 "$ref": "TextSpan"
204+ },
205+ "type": {
206+ "description": "The type of the entity mention.",
207+ "enum": [
208+ "TYPE_UNKNOWN",
209+ "PROPER",
210+ "COMMON"
211+ ],
212+ "enumDescriptions": [
213+ "Unknown",
214+ "Proper name",
215+ "Common noun (or noun compound)"
216+ ],
217+ "type": "string"
186218 }
187219 },
188220 "id": "EntityMention"
@@ -194,6 +226,22 @@
194226 "document": {
195227 "description": "Input document. Currently, `analyzeSentiment` only supports English text\n(Document.language=\"EN\").",
196228 "$ref": "Document"
229+ },
230+ "encodingType": {
231+ "description": "The encoding type used by the API to calculate sentence offsets for the\nsentence sentiment.",
232+ "enum": [
233+ "NONE",
234+ "UTF8",
235+ "UTF16",
236+ "UTF32"
237+ ],
238+ "enumDescriptions": [
239+ "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.",
240+ "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.",
241+ "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.",
242+ "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively."
243+ ],
244+ "type": "string"
197245 }
198246 },
199247 "id": "AnalyzeSentimentRequest"
@@ -209,10 +257,44 @@
209257 "language": {
210258 "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.",
211259 "type": "string"
260+ },
261+ "sentences": {
262+ "description": "The sentiment for all the sentences in the document.",
263+ "type": "array",
264+ "items": {
265+ "$ref": "Sentence"
266+ }
212267 }
213268 },
214269 "id": "AnalyzeSentimentResponse"
215270 },
271+ "AnalyzeSyntaxRequest": {
272+ "description": "The syntax analysis request message.",
273+ "type": "object",
274+ "properties": {
275+ "document": {
276+ "description": "Input document.",
277+ "$ref": "Document"
278+ },
279+ "encodingType": {
280+ "description": "The encoding type used by the API to calculate offsets.",
281+ "enum": [
282+ "NONE",
283+ "UTF8",
284+ "UTF16",
285+ "UTF32"
286+ ],
287+ "enumDescriptions": [
288+ "If `EncodingType` is not specified, encoding-dependent information (such as\n`begin_offset`) will be set at `-1`.",
289+ "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-8 encoding of the input. C++ and Go are examples of languages\nthat use this encoding natively.",
290+ "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-16 encoding of the input. Java and Javascript are examples of\nlanguages that use this encoding natively.",
291+ "Encoding-dependent information (such as `begin_offset`) is calculated based\non the UTF-32 encoding of the input. Python is an example of a language\nthat uses this encoding natively."
292+ ],
293+ "type": "string"
294+ }
295+ },
296+ "id": "AnalyzeSyntaxRequest"
297+ },
216298 "DependencyEdge": {
217299 "description": "Represents dependency parse tree information for a token.",
218300 "type": "object",
@@ -387,6 +469,31 @@
387469 },
388470 "id": "DependencyEdge"
389471 },
472+ "AnalyzeSyntaxResponse": {
473+ "description": "The syntax analysis response message.",
474+ "type": "object",
475+ "properties": {
476+ "language": {
477+ "description": "The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.",
478+ "type": "string"
479+ },
480+ "tokens": {
481+ "description": "Tokens, along with their syntactic information, in the input document.",
482+ "type": "array",
483+ "items": {
484+ "$ref": "Token"
485+ }
486+ },
487+ "sentences": {
488+ "description": "Sentences in the input document.",
489+ "type": "array",
490+ "items": {
491+ "$ref": "Sentence"
492+ }
493+ }
494+ },
495+ "id": "AnalyzeSyntaxResponse"
496+ },
390497 "AnnotateTextRequest": {
391498 "description": "The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.",
392499 "type": "object",
@@ -425,6 +532,10 @@
425532 "text": {
426533 "description": "The sentence text.",
427534 "$ref": "TextSpan"
535+ },
536+ "sentiment": {
537+ "description": "For calls to AnalyzeSentiment or if\nAnnotateTextRequest.Features.extract_document_sentiment is set to\ntrue, this field will contain the sentiment for the sentence.",
538+ "$ref": "Sentiment"
428539 }
429540 },
430541 "id": "Sentence"
@@ -452,6 +563,184 @@
452563 "description": "Represents part of speech information for a token.",
453564 "type": "object",
454565 "properties": {
566+ "aspect": {
567+ "description": "The grammatical aspect.",
568+ "enum": [
569+ "ASPECT_UNKNOWN",
570+ "PERFECTIVE",
571+ "IMPERFECTIVE",
572+ "PROGRESSIVE"
573+ ],
574+ "enumDescriptions": [
575+ "Aspect is not applicable in the analyzed language or is not predicted.",
576+ "Perfective",
577+ "Imperfective",
578+ "Progressive"
579+ ],
580+ "type": "string"
581+ },
582+ "gender": {
583+ "description": "The grammatical gender.",
584+ "enum": [
585+ "GENDER_UNKNOWN",
586+ "FEMININE",
587+ "MASCULINE",
588+ "NEUTER"
589+ ],
590+ "enumDescriptions": [
591+ "Gender is not applicable in the analyzed language or is not predicted.",
592+ "Feminine",
593+ "Masculine",
594+ "Neuter"
595+ ],
596+ "type": "string"
597+ },
598+ "person": {
599+ "description": "The grammatical person.",
600+ "enum": [
601+ "PERSON_UNKNOWN",
602+ "FIRST",
603+ "SECOND",
604+ "THIRD",
605+ "REFLEXIVE_PERSON"
606+ ],
607+ "enumDescriptions": [
608+ "Person is not applicable in the analyzed language or is not predicted.",
609+ "First",
610+ "Second",
611+ "Third",
612+ "Reflexive"
613+ ],
614+ "type": "string"
615+ },
616+ "case": {
617+ "description": "The grammatical case.",
618+ "enum": [
619+ "CASE_UNKNOWN",
620+ "ACCUSATIVE",
621+ "ADVERBIAL",
622+ "COMPLEMENTIVE",
623+ "DATIVE",
624+ "GENITIVE",
625+ "INSTRUMENTAL",
626+ "LOCATIVE",
627+ "NOMINATIVE",
628+ "OBLIQUE",
629+ "PARTITIVE",
630+ "PREPOSITIONAL",
631+ "REFLEXIVE_CASE",
632+ "RELATIVE_CASE",
633+ "VOCATIVE"
634+ ],
635+ "enumDescriptions": [
636+ "Case is not applicable in the analyzed language or is not predicted.",
637+ "Accusative",
638+ "Adverbial",
639+ "Complementive",
640+ "Dative",
641+ "Genitive",
642+ "Instrumental",
643+ "Locative",
644+ "Nominative",
645+ "Oblique",
646+ "Partitive",
647+ "Prepositional",
648+ "Reflexive",
649+ "Relative",
650+ "Vocative"
651+ ],
652+ "type": "string"
653+ },
654+ "form": {
655+ "description": "The grammatical form.",
656+ "enum": [
657+ "FORM_UNKNOWN",
658+ "ADNOMIAL",
659+ "AUXILIARY",
660+ "COMPLEMENTIZER",
661+ "FINAL_ENDING",
662+ "GERUND",
663+ "REALIS",
664+ "IRREALIS",
665+ "SHORT",
666+ "LONG",
667+ "ORDER",
668+ "SPECIFIC"
669+ ],
670+ "enumDescriptions": [
671+ "Form is not applicable in the analyzed language or is not predicted.",
672+ "Adnomial",
673+ "Auxiliary",
674+ "Complementizer",
675+ "Final ending",
676+ "Gerund",
677+ "Realis",
678+ "Irrealis",
679+ "Short form",
680+ "Long form",
681+ "Order form",
682+ "Specific form"
683+ ],
684+ "type": "string"
685+ },
686+ "tense": {
687+ "description": "The grammatical tense.",
688+ "enum": [
689+ "TENSE_UNKNOWN",
690+ "CONDITIONAL_TENSE",
691+ "FUTURE",
692+ "PAST",
693+ "PRESENT",
694+ "IMPERFECT",
695+ "PLUPERFECT"
696+ ],
697+ "enumDescriptions": [
698+ "Tense is not applicable in the analyzed language or is not predicted.",
699+ "Conditional",
700+ "Future",
701+ "Past",
702+ "Present",
703+ "Imperfect",
704+ "Pluperfect"
705+ ],
706+ "type": "string"
707+ },
708+ "proper": {
709+ "description": "The grammatical properness.",
710+ "enum": [
711+ "PROPER_UNKNOWN",
712+ "PROPER",
713+ "NOT_PROPER"
714+ ],
715+ "enumDescriptions": [
716+ "Proper is not applicable in the analyzed language or is not predicted.",
717+ "Proper",
718+ "Not proper"
719+ ],
720+ "type": "string"
721+ },
722+ "mood": {
723+ "description": "The grammatical mood.",
724+ "enum": [
725+ "MOOD_UNKNOWN",
726+ "CONDITIONAL_MOOD",
727+ "IMPERATIVE",
728+ "INDICATIVE",
729+ "INTERROGATIVE",
730+ "JUSSIVE",
731+ "SUBJUNCTIVE"
732+ ],
733+ "enumDescriptions": [
734+ "Mood is not applicable in the analyzed language or is not predicted.",
735+ "Conditional",
736+ "Imperative",
737+ "Indicative",
738+ "Interrogative",
739+ "Jussive",
740+ "Subjunctive"
741+ ],
742+ "type": "string"
743+ },
455744 "tag": {
456745 "description": "The part of speech tag.",
457746 "enum": [
@@ -487,6 +776,52 @@
487776 "Affix"
488777 ],
489778 "type": "string"
779+ },
780+ "number": {
781+ "description": "The grammatical number.",
782+ "enum": [
783+ "NUMBER_UNKNOWN",
784+ "SINGULAR",
785+ "PLURAL",
786+ "DUAL"
787+ ],
788+ "enumDescriptions": [
789+ "Number is not applicable in the analyzed language or is not predicted.",
790+ "Singular",
791+ "Plural",
792+ "Dual"
793+ ],
794+ "type": "string"
795+ },
796+ "reciprocity": {
797+ "description": "The grammatical reciprocity.",
798+ "enum": [
799+ "RECIPROCITY_UNKNOWN",
800+ "RECIPROCAL",
801+ "NON_RECIPROCAL"
802+ ],
803+ "enumDescriptions": [
804+ "Reciprocity is not applicable in the analyzed language or is not\npredicted.",
805+ "Reciprocal",
806+ "Non-reciprocal"
807+ ],
808+ "type": "string"
809+ },
810+ "voice": {
811+ "description": "The grammatical voice.",
812+ "enum": [
813+ "VOICE_UNKNOWN",
814+ "ACTIVE",
815+ "CAUSATIVE",
816+ "PASSIVE"
817+ ],
818+ "enumDescriptions": [
819+ "Voice is not applicable in the analyzed language or is not predicted.",
820+ "Active",
821+ "Causative",
822+ "Passive"
823+ ],
824+ "type": "string"
490825 }
491826 },
492827 "id": "PartOfSpeech"
@@ -532,7 +867,7 @@
532867 "type": "object",
533868 "properties": {
534869 "metadata": {
535− "description": "Metadata associated with the entity.\n\nCurrently, only Wikipedia URLs are provided, if available.\nThe associated key is \"wikipedia_url\".",
870+ "description": "Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.",
536871 "additionalProperties": {
537872 "type": "string"
538873 },
@@ -585,13 +920,18 @@
585920 "description": "Represents the feeling associated with the entire text or entities in\nthe text.",
586921 "type": "object",
587922 "properties": {
923+ "score": {
924+ "description": "Sentiment score between -1.0 (negative sentiment) and 1.0\n(positive sentiment).",
925+ "type": "number",
926+ "format": "float"
927+ },
588928 "polarity": {
589− "description": "Polarity of the sentiment in the [-1.0, 1.0] range. Larger numbers\nrepresent more positive sentiments.",
929+ "description": "DEPRECATED FIELD - This field is being deprecated in\nfavor of score. Please refer to our documentation at\nhttps://cloud.google.com/natural-language/docs for more information.",
590930 "type": "number",
591931 "format": "float"
592932 },
593933 "magnitude": {
594− "description": "A non-negative number in the [0, +inf) range, which represents\nthe absolute magnitude of sentiment regardless of polarity (positive or\nnegative).",
934+ "description": "A non-negative number in the [0, +inf) range, which represents\nthe absolute magnitude of sentiment regardless of score (positive or\nnegative).",
595935 "type": "number",
596936 "format": "float"
597937 }
@@ -615,7 +955,7 @@
615955 "$ref": "DependencyEdge"
616956 },
617957 "lemma": {
618− "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_(morphology))\nof the token.",
958+ "description": "[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.",
619959 "type": "string"
620960 }
621961 },
@@ -640,14 +980,14 @@
640980 "id": "AnalyzeEntitiesResponse"
641981 }
642982 },
643− "revision": "20160922",
983+ "revision": "20170103",
644984 "basePath": "",
645985 "icons": {
646986 "x32": "http://www.google.com/images/icons/product/search-32.gif",
647987 "x16": "http://www.google.com/images/icons/product/search-16.gif"
648988 },
649989 "version_module": "True",
650− "canonicalName": "Cloud Natural Language API",
990+ "canonicalName": "Cloud Natural Language",
651991 "discoveryVersion": "v1",
652992 "baseUrl": "https://language.googleapis.com/",
653993 "name": "language",