org.languagetool.bitext
Class TabBitextReader

Object
  extended by TabBitextReader
All Implemented Interfaces:
Iterable<StringPair>, BitextReader
Direct Known Subclasses:
WordFastTMReader

public class TabBitextReader
extends Object
implements BitextReader

Reader of simple tab-delimited bilingual files.

Author:
Marcin MiƂkowski

Constructor Summary
TabBitextReader(String filename, String encoding)
           
 
Method Summary
 int getColumnCount()
          Get the current column number in the file.
 String getCurrentLine()
          Get the current line of the bitext input.
 int getLineCount()
          Get the current line number in the file.
 int getSentencePosition()
          Get the current target sentence position in the file.
 int getTargetColumnCount()
          Get the current target column number in the file.
 Iterator<StringPair> iterator()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabBitextReader

public TabBitextReader(String filename,
                       String encoding)
Method Detail

iterator

public Iterator<StringPair> iterator()
Specified by:
iterator in interface Iterable<StringPair>

getColumnCount

public int getColumnCount()
Description copied from interface: BitextReader
Get the current column number in the file.

Specified by:
getColumnCount in interface BitextReader
Returns:
The current column number.

getTargetColumnCount

public int getTargetColumnCount()
Description copied from interface: BitextReader
Get the current target column number in the file.

Specified by:
getTargetColumnCount in interface BitextReader
Returns:
The current target column number.

getLineCount

public int getLineCount()
Description copied from interface: BitextReader
Get the current line number in the file.

Specified by:
getLineCount in interface BitextReader
Returns:
The current line number.

getSentencePosition

public int getSentencePosition()
Description copied from interface: BitextReader
Get the current target sentence position in the file.

Specified by:
getSentencePosition in interface BitextReader
Returns:
The current sentence position.

getCurrentLine

public String getCurrentLine()
Description copied from interface: BitextReader
Get the current line of the bitext input.

Specified by:
getCurrentLine in interface BitextReader
Returns:
The complete line (including source, if any).


Copyright © 2005-2011 Daniel Naber