|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectnet.java.sen.dictionary.Sentence
public class Sentence
A Sentence represents a character array to be morphologically analysed. It supports breaking ignore spans, which prevent certain characters from being considered for tokenisation, and reading constraints which restrict the returned morphemes at a certain position to those with the given reading.
| コンストラクタの概要 | |
|---|---|
Sentence(char[] characters)
Creates a sentence with the given characters |
|
Sentence(java.lang.String text)
Creates a sentence with the given string |
|
| メソッドの概要 | |
|---|---|
char[] |
getCharacters()
Returns the underlying characters of this Sentence |
Reading |
getReadingConstraint(int position)
Gets the reading constraint at the given position, if any |
SentenceIterator |
iterator()
Returns a SentenceIterator that obeys the defined breaking ignore spans, reading constraints, and skips space characters |
void |
removeReadingConstraint(int position)
Removes the reading constraint at the given position, if any |
void |
setBreakingIgnoreSpan(int position,
short length)
Sets a breaking ignore span. |
void |
setReadingConstraint(Reading constraint)
Sets a reading constraint on the Sentence starting at position |
SentenceIterator |
unconstrainedIterator(int position)
Returns a SentenceIterator that obeys the defined breaking ignore spans, skips space characters, but ignores reading constraints |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public Sentence(char[] characters)
characters - The sentence's characterspublic Sentence(java.lang.String text)
text - The string containing the sentence's characters| メソッドの詳細 |
|---|
public void setBreakingIgnoreSpan(int position,
short length)
length characters starting at
position will be ignored during iteration; no iterated
subsequence of characters will cross the ignored span.
position - The position of the ignore span to setlength - The length of the ignore span to setpublic void setReadingConstraint(Reading constraint)
position;
any existing constraints that overlap the new constraint will be removed.
- パラメータ:
constraint - The constraint to set
public Reading getReadingConstraint(int position)
position - The position to get the constraint at
nullpublic void removeReadingConstraint(int position)
position - The position to remove the constraint frompublic SentenceIterator iterator()
public SentenceIterator unconstrainedIterator(int position)
position - The position to start iterating from
public char[] getCharacters()
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||