Class: NLP::LIWCCategory

Inherits:
Category show all
Defined in:
lib/liwc_category.rb

Instance Attribute Summary

Attributes inherited from Category

#name, #parent

Instance Method Summary collapse

Methods inherited from Category

#initialize, #path, #root, #to_s

Constructor Details

This class inherits a constructor from NLP::Category

Instance Method Details

#bad_word?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/liwc_category.rb', line 55

def bad_word?
    path.include? 'WULGAR'
end

#cognitive?Boolean

Returns:

  • (Boolean)


41
42
43
44
# File 'lib/liwc_category.rb', line 41

def cognitive?
    path.include? 'KOGNITYWNE_PROCESY'

end

#emotion?Boolean

second categories

Returns:

  • (Boolean)


26
27
28
29
# File 'lib/liwc_category.rb', line 26

def emotion?
    path.include? 'EMOCJE'

end

#linguistic?Boolean

primary categories

Returns:

  • (Boolean)


7
8
9
# File 'lib/liwc_category.rb', line 7

def linguistic?
  root == :PIERWOTNE
end

#negative_emotion?Boolean

Returns:

  • (Boolean)


36
37
38
39
# File 'lib/liwc_category.rb', line 36

def negative_emotion?
    path.include? 'NEGATYWNE_EMOCJE'

end

#personal?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/liwc_category.rb', line 20

def personal?
  root == :OSOBISTE
end

#positive_emotion?Boolean

Returns:

  • (Boolean)


31
32
33
34
# File 'lib/liwc_category.rb', line 31

def positive_emotion?
     path.include? 'POZYTYWNE_EMOCJE'
   
end

#psychological?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/liwc_category.rb', line 11

def psychological?
  root == :PROCESY_PSYCHOLOGICZNE
end

#relative?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/liwc_category.rb', line 16

def relative?
    root === :RELATYWNOSC
end

#sense?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/liwc_category.rb', line 46

def sense?
    path.include? 'ZMYSLY'
end

#social?Boolean

Returns:

  • (Boolean)


50
51
52
53
# File 'lib/liwc_category.rb', line 50

def social?
    path.include? 'SOCIAL'

end