java.lang.Object
org.miaixz.bus.extra.nlp.provider.word.WordResult
- All Implemented Interfaces:
Iterable<NLPWord>,Iterator<NLPWord>,org.miaixz.bus.core.center.iterator.IterableIterator<NLPWord>,NLPResult
Implementation of
NLPResult for Word word segmentation results. This class wraps a List of
Word objects from the Word library and provides an iterator over
NLPWord objects, adapting Word's results to the common interface. Project homepage:
https://github.com/ysc/word- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
ConstructorsConstructorDescriptionWordResult(List<org.apdplat.word.segmentation.Word> result) Constructs aWordResultinstance by wrapping a list of segmentation results from the Word library. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.miaixz.bus.core.center.iterator.IterableIterator
iteratorMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
WordResult
Constructs aWordResultinstance by wrapping a list of segmentation results from the Word library.- Parameters:
result- AListofWordobjects obtained from Word segmentation.
-
-
Method Details
-
hasNext
public boolean hasNext()Checks if there are more words in the segmentation result. -
next
-
remove
public void remove()Removes the last word returned by this iterator from the underlying collection. This operation is delegated to the underlying iterator.
-