kr.ac.kaist.swrc.jhannanum.plugin.MajorPlugin.MorphAnalyzer.ChartMorphAnalyzer
Class SegmentPosition

java.lang.Object
  extended by kr.ac.kaist.swrc.jhannanum.plugin.MajorPlugin.MorphAnalyzer.ChartMorphAnalyzer.SegmentPosition

public class SegmentPosition
extends java.lang.Object

This class is for segmentation of morphemes in a given eojeol.

Author:
Sangwon Park (hudoni@world.kaist.ac.kr), CILab, SWRC, KAIST

Nested Class Summary
 class SegmentPosition.Position
          This class marks the position of segmentation.
 
Field Summary
static int MAX_MORPHEME_COUNT
          the maximum number of morphemes possible
static int MAX_SEGMENT
          the maximum number of segmentation
private  SegmentPosition.Position[] position
          the list of segment positions
static char POSITION_START_KEY
          the key of the start node for data structure
private  int positionEnd
          the last index of the segment position
static int SP_STATE_D
          the processing state - expansion regarding phoneme change phenomenon
static int SP_STATE_F
          the processing state - failure
static int SP_STATE_M
          the processing state - connection rule
static int SP_STATE_N
          the processing state - dictionary search
static int SP_STATE_R
          the processing state - recursive processing
 
Constructor Summary
SegmentPosition()
          Constructor.
 
Method Summary
 int addPosition(char key)
          Adds new segment position.
 SegmentPosition.Position getPosition(int index)
          Gets the segment position on the specified index.
 void init(java.lang.String str, Simti simti)
          Initializes the data structure for segment positions with given string.
 int nextPosition(int index)
          Returns the index of the next segment position of the position on the specified index.
 void printPosition()
          It prints the segment position information to the console.
 int setPositionLink(int prevIndex, int nextIndex)
          It connects two segment positions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SEGMENT

public static final int MAX_SEGMENT
the maximum number of segmentation

See Also:
Constant Field Values

MAX_MORPHEME_COUNT

public static final int MAX_MORPHEME_COUNT
the maximum number of morphemes possible

See Also:
Constant Field Values

SP_STATE_N

public static final int SP_STATE_N
the processing state - dictionary search

See Also:
Constant Field Values

SP_STATE_D

public static final int SP_STATE_D
the processing state - expansion regarding phoneme change phenomenon

See Also:
Constant Field Values

SP_STATE_R

public static final int SP_STATE_R
the processing state - recursive processing

See Also:
Constant Field Values

SP_STATE_M

public static final int SP_STATE_M
the processing state - connection rule

See Also:
Constant Field Values

SP_STATE_F

public static final int SP_STATE_F
the processing state - failure

See Also:
Constant Field Values

POSITION_START_KEY

public static final char POSITION_START_KEY
the key of the start node for data structure

See Also:
Constant Field Values

position

private SegmentPosition.Position[] position
the list of segment positions


positionEnd

private int positionEnd
the last index of the segment position

Constructor Detail

SegmentPosition

public SegmentPosition()
Constructor.

Method Detail

addPosition

public int addPosition(char key)
Adds new segment position.

Parameters:
key - - vowel or consonant of the segment position
Returns:
the index of the segment position in the list

getPosition

public SegmentPosition.Position getPosition(int index)
Gets the segment position on the specified index.

Parameters:
index - - the index of the segment position
Returns:
the segment position on the specified index

init

public void init(java.lang.String str,
                 Simti simti)
Initializes the data structure for segment positions with given string.

Parameters:
str - - the plain string to analyze
simti - - SIMple Trie Index

nextPosition

public int nextPosition(int index)
Returns the index of the next segment position of the position on the specified index.

Parameters:
index - - the index of the segment position
Returns:
the index of the next segment position

printPosition

public void printPosition()
It prints the segment position information to the console.


setPositionLink

public int setPositionLink(int prevIndex,
                           int nextIndex)
It connects two segment positions.

Parameters:
prevIndex - - the index of the previous position
nextIndex - - the index of the next position
Returns:
the index of the previous position