Module: Morphy

Extended by:
Morphy
Included in:
Morphy
Defined in:
lib/word.rb,
lib/morphy.rb

Defined Under Namespace

Classes: Morphy, Word

Instance Method Summary collapse

Instance Method Details

#grammemesObject



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

#newObject



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

def new
  Morphy.new
end

#paradigmsObject



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

def paradigms
  @@paradigms ||= Marshal.load(File.read("#{path}/paradigms.dat"))
end

#pathObject



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

def path
  File.dirname(__FILE__)+"/dictionary"
end

#prefixesObject



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

def prefixes
  @@prefixes ||= File.open("#{path}/prefixes.txt", 'r').read.split("\n")
end

#suffixesObject



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

def suffixes
  @@suffixes ||= File.open("#{path}/suffixes.txt", 'r').read.split("\n")
end