Class: Lingo::Database::Source::SingleWord

Inherits:
Lingo::Database::Source show all
Defined in:
lib/lingo/database/source/single_word.rb

Overview

Abgeleitet von Source behandelt die Klasse Dateien mit dem Format SingleWord. Eine Zeile "Fachbegriff\n" wird gewandelt in [ 'fachbegriff', ['#s'] ]. Die Wortklasse kann ├╝ber den Parameter def-wc beeinflusst werden.

Instance Attribute Summary

Attributes inherited from Lingo::Database::Source

#pos

Instance Method Summary (collapse)

Methods inherited from Lingo::Database::Source

#each, get, #rejected, #set, #size

Constructor Details

- (SingleWord) initialize(id, lingo)

Returns a new instance of SingleWord



39
40
41
42
43
# File 'lib/lingo/database/source/single_word.rb', line 39

def initialize(id, lingo)
  super(id, lingo, Language::LA_NOUN)
  @pat = /^(#{@wrd})$/
  @mul = @config.fetch('def-mul-wc', @def).downcase
end