net.moraleboost.junsai.util
クラス NodeFormatter

java.lang.Object
  上位を拡張 net.moraleboost.junsai.util.NodeFormatter

public class NodeFormatter
extends java.lang.Object

Nodeを書式化するためのクラス。 形態素解析結果を整形するために用いられる。

作成者:
taketa

フィールドの概要
static int OUTPUT_FORMAT_DUMP
           
static int OUTPUT_FORMAT_EM
           
static int OUTPUT_FORMAT_LATTICE
           
static int OUTPUT_FORMAT_NONE
           
static int OUTPUT_FORMAT_USER
           
static int OUTPUT_FORMAT_WAKATI
           
 
コンストラクタの概要
NodeFormatter(int outputFormat, java.lang.String nodeFormat, java.lang.String unkFormat, java.lang.String bosFormat, java.lang.String eosFormat, java.lang.String eonFormat)
           
 
メソッドの概要
 boolean format(java.lang.CharSequence sentence, int offset, int len, Node node, java.lang.Appendable out)
           
 boolean formatNode(java.lang.CharSequence sentence, int offset, int len, Node node, java.lang.Appendable out)
           
static boolean formatNode(java.lang.String format, java.lang.CharSequence sentence, int offset, int len, Node node, java.lang.Appendable out)
           
 java.lang.String getBosFormat()
           
 java.lang.String getEonFormat()
           
 java.lang.String getEosFormat()
           
 java.lang.String getNodeFormat()
           
 int getOutputFormat()
           
 java.lang.String getUnkFormat()
           
 void setBosFormat(java.lang.String bosFormat)
           
 void setEonFormat(java.lang.String eonFormat)
           
 void setEosFormat(java.lang.String eosFormat)
           
 void setNodeFormat(java.lang.String nodeFormat)
           
 void setOutputFormat(int outputFormat)
           
 void setUnkFormat(java.lang.String unkFormat)
           
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

OUTPUT_FORMAT_LATTICE

public static final int OUTPUT_FORMAT_LATTICE
関連項目:
定数フィールド値

OUTPUT_FORMAT_WAKATI

public static final int OUTPUT_FORMAT_WAKATI
関連項目:
定数フィールド値

OUTPUT_FORMAT_NONE

public static final int OUTPUT_FORMAT_NONE
関連項目:
定数フィールド値

OUTPUT_FORMAT_DUMP

public static final int OUTPUT_FORMAT_DUMP
関連項目:
定数フィールド値

OUTPUT_FORMAT_EM

public static final int OUTPUT_FORMAT_EM
関連項目:
定数フィールド値

OUTPUT_FORMAT_USER

public static final int OUTPUT_FORMAT_USER
関連項目:
定数フィールド値
コンストラクタの詳細

NodeFormatter

public NodeFormatter(int outputFormat,
                     java.lang.String nodeFormat,
                     java.lang.String unkFormat,
                     java.lang.String bosFormat,
                     java.lang.String eosFormat,
                     java.lang.String eonFormat)
メソッドの詳細

getOutputFormat

public int getOutputFormat()

setOutputFormat

public void setOutputFormat(int outputFormat)

getNodeFormat

public java.lang.String getNodeFormat()

setNodeFormat

public void setNodeFormat(java.lang.String nodeFormat)

getBosFormat

public java.lang.String getBosFormat()

setBosFormat

public void setBosFormat(java.lang.String bosFormat)

getEosFormat

public java.lang.String getEosFormat()

setEosFormat

public void setEosFormat(java.lang.String eosFormat)

getUnkFormat

public java.lang.String getUnkFormat()

setUnkFormat

public void setUnkFormat(java.lang.String unkFormat)

getEonFormat

public java.lang.String getEonFormat()

setEonFormat

public void setEonFormat(java.lang.String eonFormat)

format

public boolean format(java.lang.CharSequence sentence,
                      int offset,
                      int len,
                      Node node,
                      java.lang.Appendable out)
               throws java.io.IOException
例外:
java.io.IOException

formatNode

public boolean formatNode(java.lang.CharSequence sentence,
                          int offset,
                          int len,
                          Node node,
                          java.lang.Appendable out)
                   throws java.io.IOException
例外:
java.io.IOException

formatNode

public static boolean formatNode(java.lang.String format,
                                 java.lang.CharSequence sentence,
                                 int offset,
                                 int len,
                                 Node node,
                                 java.lang.Appendable out)
                          throws java.io.IOException
例外:
java.io.IOException