Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ipipan.spejd.readers
Class PlainTextReader

    java.lang.Object
      ipipan.spejd.readers.Reader
          ipipan.spejd.readers.PlainTextReader

    public class PlainTextReader

extends Reader

Field Summary
`int` | `ogonkified`
`int` | `ogonkified_total`

Constructor Summary
`PlainTextReader(Config conf, Stempelator stemmer)`

Method Summary
`java.util.List<java.lang.String>` | `generateCandidates(java.lang.String orth)` Generate a list of ogonkified words - candidates to check.
`java.lang.String` | `getNextToken(int pos)` Utility to see what word starts from position in domain.com
`Entity` | `loadToken()` Move to another word and run Morfeusz over it.
`boolean` | `nextSentence(java.io.PrintStream out)` Move on to the next sentence.
`java.lang.String` | `readTextFile(java.lang.String fileName, java.nio.charset.Charset inputCharset)` Reads the content of the text file and returns it as a string
`void` | `setFileContents(java.lang.String fileContents)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ogonkified

    public int ogonkified

### ogonkified_total

    public int ogonkified_total

Constructor Detail

### PlainTextReader

    public PlainTextReader(Config conf,
                           Stempelator stemmer)

Method Detail

### readTextFile

    public java.lang.String readTextFile(java.lang.String fileName,
                                         java.nio.charset.Charset inputCharset)
                                  throws java.lang.Error

  Reads the content of the text file and returns it as a string

  Parameters:
    `fileName` - The name of the file to read.
  Returns:
    The content of the file.
  Throws:
    `marker.Error` - When somethings goes wrong with the reading.
    `java.lang.Error`

### getNextToken

    public java.lang.String getNextToken(int pos)

  Utility to see what word starts from position in domain.com

  Parameters:
    `pos` - start word construction here
  Returns:
    word of up to 4 alpha characters as seen starting from pos

### loadToken

    public Entity loadToken()

  Move to another word and run Morfeusz over it. Method returns null if end of sentence has been reached.

  Specified by:
    `loadToken` in class `Reader`
  Returns:
    next segment with interpretations polled from fileContents String

### generateCandidates

    public java.util.List<java.lang.String> generateCandidates(java.lang.String orth)

  Generate a list of ogonkified words - candidates to check.

  Parameters:
    `orth` - form to generate candidates from
  Returns:

### setFileContents

    public void setFileContents(java.lang.String fileContents)

### nextSentence

    public boolean nextSentence(java.io.PrintStream out)

  Description copied from class: `Reader`
  Move on to the next sentence.

  Specified by:
    `nextSentence` in class `Reader`
  Parameters:
    `out` - result file
  Returns:
    true if there exists a next sentence

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD