Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.decoder.ff.tm.GrammarFactory Interface Reference
Inheritance diagram for joshua.decoder.ff.tm.GrammarFactory:
[legend]

List of all members.

Public Member Functions

Grammar getGrammarForSentence (Sentence sentence)

Detailed Description

Factory capable of getting a grammar for use in translating a sentence.

Developers interested in implementing a new type of grammar must:

  1. Implement GrammarFactory
  2. Implement Grammar
  3. Implement TrieGrammar
  4. Implement RuleCollection

Also, attention should be directed to the Rule class.

Author:
Lane Schwartz
Version:
$LastChangedDate$

Member Function Documentation

Returns a grammar which is adapted to the specified sentence. Depending on the implementation this grammar may be generated online, partially loaded from disk, remain unchanged etc.

Parameters:
sentenceA sentence to be translated
Returns:
A grammar that represents a set of translation rules, relevant for translating (at least) the given sentence.

Implemented in joshua.decoder.ff.tm.BatchGrammar.