You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the Natural Language service. The implementation should use the GAX middleware. The Ruby API should be similar to Vision, by allowing multiple features to be run at once, or individual features to be run on a Document object.
gcloud=Google::Cloud.newlanguage=gcloud.language# Run annotations on a Document objectdoc=language.document"Blah blah blah",language: :en# Run just syntax annotationsyntax=doc.syntax# Run just entities annotationentities=doc.entities# Run just sentiment annotationsentiment=doc.sentiment# Run all annotations (syntax, entities, sentiment) in a single callannotations=language.annotatedoc,encoding: :utf8# Run only syntax annotation, passing in content instead of Documentannotations=language.annotate"Blah <b>blah</b> blah",syntax: true,format: :html# Run just entities and sentiment annotations for Storage Filefile=gcloud.storage.bucket("my_bucket").file("content.html")annotations=language.annotatefile,entities: true,sentiment: trueentities=annotations.entitiessentiment=annotations.sentiment
Here are some remaining tasks, not all are needed for release.
Documentation pass!
Enable retries configuration
Check content string encoding, possibly auto-convert if not a supported encoding?
Validate encoding optional argument is one of the supported enum values
Add Token#part_of_speech helpers?
Add Token#label helpers?
The text was updated successfully, but these errors were encountered:
Implement the Natural Language service. The implementation should use the GAX middleware. The Ruby API should be similar to Vision, by allowing multiple features to be run at once, or individual features to be run on a Document object.
Here are some remaining tasks, not all are needed for release.
encoding
optional argument is one of the supported enum valuesToken#part_of_speech
helpers?Token#label
helpers?The text was updated successfully, but these errors were encountered: