Package com.yahoo.language.detect
Class AbstractDetector
java.lang.Object
com.yahoo.language.detect.AbstractDetector
- All Implemented Interfaces:
Detector
- Author:
- Simon Thoresen Hult
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Detection
Detects language of the supplied String, possibly using a language hint.final Detection
detect
(ByteBuffer input, Hint hint) Detects language and encoding of the supplied ByteBuffer, possibly using a language/encoding hint.
-
Constructor Details
-
AbstractDetector
public AbstractDetector()
-
-
Method Details
-
detect
Description copied from interface:Detector
Detects language of the supplied String, possibly using a language hint. -
detect
Description copied from interface:Detector
Detects language and encoding of the supplied ByteBuffer, possibly using a language/encoding hint.- Specified by:
detect
in interfaceDetector
- Parameters:
input
- the buffer that is to be inspected, from its current position to its limithint
- a hint to the detector, or null for no hint- Returns:
- an array of possible language/encoding pairs, sorted by decreasing confidence (possibly empty, but never null)
-