File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717A document is used to hold text to be analyzed and annotated.
1818"""
1919
20+ import collections
21+
2022from gcloud .language .entity import Entity
2123from gcloud .language .sentiment import Sentiment
2224
2527"""Default document language, English."""
2628
2729
30+ Annotations = collections .namedtuple (
31+ 'Annotations' ,
32+ 'sentences tokens sentiment entities' )
33+ """Annotations for a document.
34+
35+ :type sentences: list
36+ :param sentences: List of :class:`.Sentence` in a document.
37+
38+ :type tokens: list
39+ :param tokens: List of :class:`.Token` from a document.
40+
41+ :type sentiment: :class:`Sentiment`
42+ :param sentiment: The sentiment of a document.
43+
44+ :type entities: list
45+ :param entities: List of :class:`~.language.entity.Entity`
46+ found in a document.
47+ """
48+
49+
2850class Encoding (object ):
2951 """Document text encoding types."""
3052
You can’t perform that action at this time.
0 commit comments