1   package eu.fbk.dh.tint.tokenizer.models;
2   
3   import eu.fbk.dh.tint.tokenizer.ItalianTokenizer;
4   import org.slf4j.Logger;
5   import org.slf4j.LoggerFactory;
6   
7   import java.io.File;
8   
9   /**
10   * Created by alessio on 25/05/15.
11   */
12  
13  public class ItalianTokenizerModel {
14  
15      private static ItalianTokenizerModel instance;
16      private ItalianTokenizer tokenizer;
17      private static final Logger LOGGER = LoggerFactory.getLogger(ItalianTokenizerModel.class);
18  
19      private ItalianTokenizerModel(File configuration) {
20          LOGGER.trace("Loading model for Italian tokenizer");
21          tokenizer = new ItalianTokenizer(configuration);
22      }
23  
24      public static ItalianTokenizerModel getInstance(File posModel) {
25          if (instance == null) {
26              instance = new ItalianTokenizerModel(posModel);
27          }
28  
29          return instance;
30      }
31  
32      public ItalianTokenizer getTokenizer() {
33          return tokenizer;
34      }
35  }