Class: Google::Apis::LanguageV1::PartOfSpeech

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/language_v1/classes.rb,
generated/google/apis/language_v1/representations.rb,
generated/google/apis/language_v1/representations.rb

Overview

Represents part of speech information for a token. Parts of speech are as defined in http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PartOfSpeech

Returns a new instance of PartOfSpeech



91
92
93
# File 'generated/google/apis/language_v1/classes.rb', line 91

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#aspectString

The grammatical aspect. Corresponds to the JSON property aspect

Returns:

  • (String)


49
50
51
# File 'generated/google/apis/language_v1/classes.rb', line 49

def aspect
  @aspect
end

#caseString

The grammatical case. Corresponds to the JSON property case

Returns:

  • (String)


79
80
81
# File 'generated/google/apis/language_v1/classes.rb', line 79

def case
  @case
end

#formString

The grammatical form. Corresponds to the JSON property form

Returns:

  • (String)


34
35
36
# File 'generated/google/apis/language_v1/classes.rb', line 34

def form
  @form
end

#genderString

The grammatical gender. Corresponds to the JSON property gender

Returns:

  • (String)


64
65
66
# File 'generated/google/apis/language_v1/classes.rb', line 64

def gender
  @gender
end

#moodString

The grammatical mood. Corresponds to the JSON property mood

Returns:

  • (String)


54
55
56
# File 'generated/google/apis/language_v1/classes.rb', line 54

def mood
  @mood
end

#numberString

The grammatical number. Corresponds to the JSON property number

Returns:

  • (String)


39
40
41
# File 'generated/google/apis/language_v1/classes.rb', line 39

def number
  @number
end

#personString

The grammatical person. Corresponds to the JSON property person

Returns:

  • (String)


69
70
71
# File 'generated/google/apis/language_v1/classes.rb', line 69

def person
  @person
end

#properString

The grammatical properness. Corresponds to the JSON property proper

Returns:

  • (String)


74
75
76
# File 'generated/google/apis/language_v1/classes.rb', line 74

def proper
  @proper
end

#reciprocityString

The grammatical reciprocity. Corresponds to the JSON property reciprocity

Returns:

  • (String)


89
90
91
# File 'generated/google/apis/language_v1/classes.rb', line 89

def reciprocity
  @reciprocity
end

#tagString

The part of speech tag. Corresponds to the JSON property tag

Returns:

  • (String)


59
60
61
# File 'generated/google/apis/language_v1/classes.rb', line 59

def tag
  @tag
end

#tenseString

The grammatical tense. Corresponds to the JSON property tense

Returns:

  • (String)


84
85
86
# File 'generated/google/apis/language_v1/classes.rb', line 84

def tense
  @tense
end

#voiceString

The grammatical voice. Corresponds to the JSON property voice

Returns:

  • (String)


44
45
46
# File 'generated/google/apis/language_v1/classes.rb', line 44

def voice
  @voice
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'generated/google/apis/language_v1/classes.rb', line 96

def update!(**args)
  @form = args[:form] if args.key?(:form)
  @number = args[:number] if args.key?(:number)
  @voice = args[:voice] if args.key?(:voice)
  @aspect = args[:aspect] if args.key?(:aspect)
  @mood = args[:mood] if args.key?(:mood)
  @tag = args[:tag] if args.key?(:tag)
  @gender = args[:gender] if args.key?(:gender)
  @person = args[:person] if args.key?(:person)
  @proper = args[:proper] if args.key?(:proper)
  @case = args[:case] if args.key?(:case)
  @tense = args[:tense] if args.key?(:tense)
  @reciprocity = args[:reciprocity] if args.key?(:reciprocity)
end