Class: TranscriptionPolisherService
- Inherits:
-
Object
- Object
- TranscriptionPolisherService
- Defined in:
- app/services/transcription_polisher_service.rb
Overview
Service object: transcription polisher service.
Instance Method Summary collapse
-
#initialize(company_terminology = {}) ⇒ TranscriptionPolisherService
constructor
A new instance of TranscriptionPolisherService.
- #polish_utterances(utterances) ⇒ Object
Constructor Details
#initialize(company_terminology = {}) ⇒ TranscriptionPolisherService
Returns a new instance of TranscriptionPolisherService.
5 6 7 |
# File 'app/services/transcription_polisher_service.rb', line 5 def initialize(company_terminology = {}) @company_terminology = company_terminology end |
Instance Method Details
#polish_utterances(utterances) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/services/transcription_polisher_service.rb', line 9 def polish_utterances(utterances) Rails.logger.info "Polishing #{utterances.length} utterances with regexp-based corrections" utterances.map do |utterance| polished_utterance = apply_regexp_corrections(utterance) polished_utterance end end |