Class: NLP::LIWCCategory

Inherits:
Category show all
Defined in:
lib/dictionaries/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)


49
50
51
# File 'lib/dictionaries/liwc_category.rb', line 49

def bad_word?
  path.include? 'WULGAR'
end

#cognitive?Boolean

Returns:

  • (Boolean)


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

def cognitive?
  path.include? 'KOGNITYWNE_PROCESY'
end

#emotion?Boolean

second categories

Returns:

  • (Boolean)


25
26
27
# File 'lib/dictionaries/liwc_category.rb', line 25

def emotion?
  path.include? 'EMOCJE'
end

#linguistic?Boolean

primary categories

Returns:

  • (Boolean)


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

def linguistic?
  root == :PIERWOTNE
end

#negative_emotion?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/dictionaries/liwc_category.rb', line 33

def negative_emotion?
  path.include? 'NEGATYWNE_EMOCJE'
end

#personal?Boolean

Returns:

  • (Boolean)


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

def personal?
  root == :OSOBISTE
end

#positive_emotion?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/dictionaries/liwc_category.rb', line 29

def positive_emotion?
  path.include? 'POZYTYWNE_EMOCJE'
end

#psychological?Boolean

Returns:

  • (Boolean)


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

def psychological?
  root == :PROCESY_PSYCHOLOGICZNE
end

#relative?Boolean

Returns:

  • (Boolean)


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

def relative?
  root === :RELATYWNOSC
end

#sense?Boolean

Returns:

  • (Boolean)


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

def sense?
  path.include? 'ZMYSLY'
end

#social?Boolean

Returns:

  • (Boolean)


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

def social?
  path.include? 'SOCIAL'
end