1   package org.daisy.pipeline.nlp;
2   
3   import java.util.Collection;
4   import java.util.Locale;
5   
6   public interface LangDetector {
7   
8   	Locale findLang(Locale likelyLang, Collection<String> text);
9   
10  	/**
11  	 * Light training phase.
12  	 */
13  	void train();
14  
15  	/**
16  	 * Allocate resources for further detections.
17  	 */
18  	void enable();
19  
20  	/**
21  	 * Release the resources allocated by enable(). It has no effect on the
22  	 * trained parameters.
23  	 */
24  	void disable();
25  }