This C# sample demonstrates the use of the Google Cloud Natural Language API for sentiment, entity, and syntax analysis.
-
Follow the instructions in the root README.
-
Enable APIs for your project. Click here to visit Cloud Platform Console and enable the Natural Language API.
-
Open Analyze.sln with Microsoft Visual Studio version 2015 or later.
-
Build the Solution.
-
Run.
The script will write to STDOUT the json returned from the API for the requested feature.
For example, if you run:
c:\> Analyze everything Santa Claus Conquers the Martians is a terrible movie. It's so bad, it's good.
You will see something like the following returned:
Language: en Score: -1 Magnitude: 1.6 Sentences: 0: Santa Claus Conquers the Martians is a terrible movie. 55: It's so bad, it's good. Entities: Name: Santa Claus Conquers the Martians Type: ORGANIZATION Salience: 0.5174748 Mentions: 0: Santa Claus Conquers the Martians Metadata: wikipedia_url: http://en.wikipedia.org/wiki/Santa_Claus_Conquers_the_Martians
- See CONTRIBUTING.md
- See LICENSE