Top Inners Fields Constructors Methods
com.ibm.icu.impl.breakiter

public abstract Class DictionaryBreakEngine

extends Object
implements LanguageBreakEngine
Class Inheritance
All Implemented Interfaces
com.ibm.icu.impl.breakiter.LanguageBreakEngine
Known Direct Subclasses
com.ibm.icu.impl.breakiter.KhmerBreakEngine, com.ibm.icu.impl.breakiter.LaoBreakEngine, com.ibm.icu.impl.breakiter.LSTMBreakEngine, com.ibm.icu.impl.breakiter.ThaiBreakEngine, com.ibm.icu.impl.breakiter.BurmeseBreakEngine, com.ibm.icu.impl.breakiter.CjkBreakEngine
Imports
java.text.CharacterIterator, com.ibm.icu.impl.CharacterIteration, com.ibm.icu.text.UnicodeSet

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
DictionaryBreakEngine.DequeI

A deque-like structure holding raw ints.

pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv UnicodeSet

Constructor Summary

AccessConstructor and Description
public
DictionaryBreakEngine()

Constructor

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract int

Returns:

The number of breaks found
divideUpDictionaryRange
(CharacterIterator
A UText representing the text
text
,
int
The start of the range of dictionary characters
rangeStart
,
int
The end of the range of dictionary characters
rangeEnd
,
DictionaryBreakEngine.DequeI
Output of break positions. Positions are pushed. Pre-existing contents of the output stack are unaltered.
foundBreaks
,
boolean isPhraseBreaking)

Divide up a range of known dictionary characters handled by this break engine.

public int
findBreaks(CharacterIterator
The text to break over. The iterator is left at the end of the run of characters which the engine has handled.
text
,
int
The index of the beginning of the range
startPos
,
int
The index of the possible end of our range. It is possible, however, that the range ends earlier
endPos
,
DictionaryBreakEngine.DequeI
A data structure to receive the break positions.
foundBreaks
,
boolean isPhraseBreaking)

Implements com.ibm.icu.impl.breakiter.LanguageBreakEngine.findBreaks.

Implements the actual breaking logic.
public boolean
handles(int
A Unicode codepoint value
c
)

Implements com.ibm.icu.impl.breakiter.LanguageBreakEngine.handles.

pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fSetback to summary
pack-priv UnicodeSet fSet

Constructor Detail

DictionaryBreakEngineback to summary
public DictionaryBreakEngine()

Constructor

Method Detail

divideUpDictionaryRangeback to summary
pack-priv abstract int divideUpDictionaryRange(CharacterIterator text, int rangeStart, int rangeEnd, DictionaryBreakEngine.DequeI foundBreaks, boolean isPhraseBreaking)

Divide up a range of known dictionary characters handled by this break engine.

Parameters
text:CharacterIterator

A UText representing the text

rangeStart:int

The start of the range of dictionary characters

rangeEnd:int

The end of the range of dictionary characters

foundBreaks:DictionaryBreakEngine.DequeI

Output of break positions. Positions are pushed. Pre-existing contents of the output stack are unaltered.

Returns:int

The number of breaks found

findBreaksback to summary
public int findBreaks(CharacterIterator text, int startPos, int endPos, DictionaryBreakEngine.DequeI foundBreaks, boolean isPhraseBreaking)

Implements com.ibm.icu.impl.breakiter.LanguageBreakEngine.findBreaks.

Doc from com.ibm.icu.impl.breakiter.LanguageBreakEngine.findBreaks.

Implements the actual breaking logic. Find any breaks within a run in the supplied text.

Parameters
text:CharacterIterator

The text to break over. The iterator is left at the end of the run of characters which the engine has handled.

startPos:int

The index of the beginning of the range

endPos:int

The index of the possible end of our range. It is possible, however, that the range ends earlier

foundBreaks:DictionaryBreakEngine.DequeI

A data structure to receive the break positions.

Returns:int

the number of breaks found

Annotations
@Override
handlesback to summary
public boolean handles(int c)

Implements com.ibm.icu.impl.breakiter.LanguageBreakEngine.handles.

Parameters
c:int

Doc from com.ibm.icu.impl.breakiter.LanguageBreakEngine.handles.

A Unicode codepoint value

Returns:boolean

Doc from com.ibm.icu.impl.breakiter.LanguageBreakEngine.handles.

true if the engine can handle this character, false otherwise

Annotations
@Override
setCharactersback to summary
pack-priv void setCharacters(UnicodeSet set)
com.ibm.icu.impl.breakiter back to summary

public Class DictionaryBreakEngine.DequeI

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable

A deque-like structure holding raw ints. Partial, limited implementation, only what is needed by the dictionary implementation. For internal use only.
ICU Status
Internal ICU component.

Field Summary

Modifier and TypeField and Description
private int[]
private int
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
pack-priv boolean
contains(int v)

public int
elementAt(int i)

private void
grow()

public boolean
public void
offer(int v)

public int
peek()

pack-priv int
pack-priv int
public int
pop()

public void
push(int v)

public void
public int
size()

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databack to summary
private int[] data
firstIdxback to summary
private int firstIdx
lastIdxback to summary
private int lastIdx

Constructor Detail

DequeIback to summary
public DequeI()

Method Detail

cloneback to summary
public Object clone() throws CloneNotSupportedException

Overrides java.lang.Object.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:Object

a clone of this instance.

Annotations
@Override
Exceptions
CloneNotSupportedException:
if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.
containsback to summary
pack-priv boolean contains(int v)
elementAtback to summary
public int elementAt(int i)
growback to summary
private void grow()
isEmptyback to summary
public boolean isEmpty()
offerback to summary
public void offer(int v)
peekback to summary
public int peek()
peekLastback to summary
pack-priv int peekLast()
pollLastback to summary
pack-priv int pollLast()
popback to summary
public int pop()
pushback to summary
public void push(int v)
removeAllElementsback to summary
public void removeAllElements()
sizeback to summary
public int size()
com.ibm.icu.impl.breakiter back to summary

pack-priv Class DictionaryBreakEngine.PossibleWord

extends Object
Class Inheritance
  • java.lang.Object
  • com.ibm.icu.impl.breakiter.DictionaryBreakEngine.PossibleWord

Field Summary

Modifier and TypeField and Description
private int[]
private int
private int[]
private int
private int
private static final int
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
public boolean
public int
candidates(CharacterIterator fIter, DictionaryMatcher dict, int rangeEnd)

public int
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
private int[] count
currentback to summary
private int current
lengthsback to summary
private int[] lengths
markback to summary
private int mark
offsetback to summary
private int offset
POSSIBLE_WORD_LIST_MAXback to summary
private static final int POSSIBLE_WORD_LIST_MAX
prefixback to summary
private int prefix

Constructor Detail

PossibleWordback to summary
public PossibleWord()

Method Detail

acceptMarkedback to summary
public int acceptMarked(CharacterIterator fIter)
backUpback to summary
public boolean backUp(CharacterIterator fIter)
candidatesback to summary
public int candidates(CharacterIterator fIter, DictionaryMatcher dict, int rangeEnd)
longestPrefixback to summary
public int longestPrefix()
markCurrentback to summary
public void markCurrent()