Module: Morphy
Defined Under Namespace
Instance Method Summary collapse
- #grammemes ⇒ Object
- #new ⇒ Object
- #paradigms ⇒ Object
- #path ⇒ Object
- #prefixes ⇒ Object
- #suffixes ⇒ Object
Instance Method Details
#grammemes ⇒ Object
49 50 51 |
# File 'lib/morphy.rb', line 49 def grammemes @@grammemes ||= File.open("#{path}/grammemes.txt", 'r').read.split("\n").map{|g| g.split(",")} end |
#new ⇒ Object
29 30 31 |
# File 'lib/morphy.rb', line 29 def new Morphy.new end |
#paradigms ⇒ Object
37 38 39 |
# File 'lib/morphy.rb', line 37 def paradigms @@paradigms ||= Marshal.load(File.read("#{path}/paradigms.dat")) end |
#path ⇒ Object
33 34 35 |
# File 'lib/morphy.rb', line 33 def path File.dirname(__FILE__)+"/dictionary" end |
#prefixes ⇒ Object
41 42 43 |
# File 'lib/morphy.rb', line 41 def prefixes @@prefixes ||= File.open("#{path}/prefixes.txt", 'r').read.split("\n") end |
#suffixes ⇒ Object
45 46 47 |
# File 'lib/morphy.rb', line 45 def suffixes @@suffixes ||= File.open("#{path}/suffixes.txt", 'r').read.split("\n") end |