Package com.yahoo.language.detect
Class AbstractDetector
- java.lang.Object
-
- com.yahoo.language.detect.AbstractDetector
-
-
Constructor Summary
Constructors Constructor Description AbstractDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Detection
detect(String input, Hint hint)
Detects language of the supplied String, possibly using a language hint.Detection
detect(ByteBuffer input, Hint hint)
Detects language and encoding of the supplied ByteBuffer, possibly using a language/encoding hint.
-
-
-
Method Detail
-
detect
public final Detection detect(String input, Hint hint)
Description copied from interface:Detector
Detects language of the supplied String, possibly using a language hint.
-
detect
public final Detection detect(ByteBuffer input, Hint hint)
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)
-
-