Class: Transcribe::Language

Inherits:
Object
  • Object
show all
Defined in:
lib/transcribe/language.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Language

Returns a new instance of Language.



7
8
9
10
# File 'lib/transcribe/language.rb', line 7

def initialize(name)
  @name = name
  load_yaml(@name)
end

Instance Method Details

#transcribe(text) ⇒ Object



12
13
14
15
# File 'lib/transcribe/language.rb', line 12

def transcribe(text)
  @terms.each { |t| t.apply! text }
  text
end