Joshua
open source statistical hierarchical phrase-based machine translation system
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
joshua.decoder.segment_file.Sentence Class Reference
Inheritance diagram for joshua.decoder.segment_file.Sentence:
[legend]
Collaboration diagram for joshua.decoder.segment_file.Sentence:
[legend]

List of all members.

Public Member Functions

 Sentence (String sentence, int id)
boolean isEmpty ()
int id ()
String sentence ()
int[] intSentence ()
List< ConstraintSpanconstraints ()
Lattice< Integer > intLattice ()

Static Protected Attributes

static final Pattern SEG_START
static final Pattern SEG_END = Pattern.compile("\\s*</seg\\s*>\\s*$")

Private Attributes

int sequenceId = -1
int id = -1
String sentence
List< ConstraintSpanconstraints

Static Private Attributes

static final Logger logger = Logger.getLogger(Sentence.class.getName())

Detailed Description

This class represents a basic input sentence. A sentence is a sequence of UTF-8 characters denoting a string of source language words. The sequence can optionally be wrapped in <seg id="N">...</seg> tags, which are then used to set the sentence number (a 0-indexed ID).

Author:
Matt Post post@.nosp@m.jhu..nosp@m.edu
Version:
$LastChangedDate$

Constructor & Destructor Documentation

joshua.decoder.segment_file.Sentence.Sentence ( String  sentence,
int  id 
)

Here is the call graph for this function:


Member Function Documentation

Here is the caller graph for this function:

Here is the caller graph for this function:

Reimplemented in joshua.decoder.segment_file.LatticeInput.

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in joshua.decoder.segment_file.ParsedSentence.

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:


Member Data Documentation

final Logger joshua.decoder.segment_file.Sentence.logger = Logger.getLogger(Sentence.class.getName()) [static, private]
final Pattern joshua.decoder.segment_file.Sentence.SEG_END = Pattern.compile("\\s*</seg\\s*>\\s*$") [static, protected]
final Pattern joshua.decoder.segment_file.Sentence.SEG_START [static, protected]
Initial value:
 Pattern
      .compile("^\\s*<seg\\s+id=\"?(\\d+)\"?[^>]*>\\s*")