@Override protected void init(Dictionary ngramDictionary, TagDictionary posDictionary) { super.init(ngramDictionary, null); this.dict = posDictionary; }
/** * Creates a {@link POSTaggerFactory}. Use this constructor to * programmatically create a factory. * * @param ngramDictionary * @param posDictionary * * @deprecated this constructor is here for backward compatibility and * is not functional anymore in the training of 1.8.x series models */ @Deprecated public POSTaggerFactory(Dictionary ngramDictionary, TagDictionary posDictionary) { this.init(ngramDictionary, posDictionary); // TODO: This could be made functional by creating some default feature generation // which uses the dictionary ... }
@Deprecated public static POSTaggerFactory create(String subclassName, Dictionary ngramDictionary, TagDictionary posDictionary) throws InvalidFormatException { if (subclassName == null) { // will create the default factory return new POSTaggerFactory(ngramDictionary, posDictionary); } try { POSTaggerFactory theFactory = ExtensionLoader.instantiateExtension( POSTaggerFactory.class, subclassName); theFactory.init(ngramDictionary, posDictionary); return theFactory; } catch (Exception e) { String msg = "Could not instantiate the " + subclassName + ". The initialization throw an exception."; throw new InvalidFormatException(msg, e); } }
public static POSTaggerFactory create(String subclassName, byte[] featureGeneratorBytes, Map<String, Object> resources, TagDictionary posDictionary) throws InvalidFormatException { POSTaggerFactory theFactory; if (subclassName == null) { // will create the default factory theFactory = new POSTaggerFactory(null, posDictionary); } else { try { theFactory = ExtensionLoader.instantiateExtension( POSTaggerFactory.class, subclassName); } catch (Exception e) { String msg = "Could not instantiate the " + subclassName + ". The initialization throw an exception."; throw new InvalidFormatException(msg, e); } } theFactory.init(featureGeneratorBytes, resources, posDictionary); return theFactory; }
@Override protected void init(Dictionary ngramDictionary, TagDictionary posDictionary) { super.init(ngramDictionary, null); this.dict = posDictionary; }
/** * Creates a {@link POSTaggerFactory}. Use this constructor to * programmatically create a factory. * * @param ngramDictionary * @param posDictionary * * @deprecated this constructor is here for backward compatibility and * is not functional anymore in the training of 1.8.x series models */ @Deprecated public POSTaggerFactory(Dictionary ngramDictionary, TagDictionary posDictionary) { this.init(ngramDictionary, posDictionary); // TODO: This could be made functional by creating some default feature generation // which uses the dictionary ... }
/** * Creates a {@link POSTaggerFactory}. Use this constructor to * programmatically create a factory. * * @param ngramDictionary * @param posDictionary * * @deprecated this constructor is here for backward compatibility and * is not functional anymore in the training of 1.8.x series models */ @Deprecated public POSTaggerFactory(Dictionary ngramDictionary, TagDictionary posDictionary) { this.init(ngramDictionary, posDictionary); // TODO: This could be made functional by creating some default feature generation // which uses the dictionary ... }
factory.init(featureGeneratorBytes, resources, dict);
@Deprecated public static POSTaggerFactory create(String subclassName, Dictionary ngramDictionary, TagDictionary posDictionary) throws InvalidFormatException { if (subclassName == null) { // will create the default factory return new POSTaggerFactory(ngramDictionary, posDictionary); } try { POSTaggerFactory theFactory = ExtensionLoader.instantiateExtension( POSTaggerFactory.class, subclassName); theFactory.init(ngramDictionary, posDictionary); return theFactory; } catch (Exception e) { String msg = "Could not instantiate the " + subclassName + ". The initialization throw an exception."; throw new InvalidFormatException(msg, e); } }
@Deprecated public static POSTaggerFactory create(String subclassName, Dictionary ngramDictionary, TagDictionary posDictionary) throws InvalidFormatException { if (subclassName == null) { // will create the default factory return new POSTaggerFactory(ngramDictionary, posDictionary); } try { POSTaggerFactory theFactory = ExtensionLoader.instantiateExtension( POSTaggerFactory.class, subclassName); theFactory.init(ngramDictionary, posDictionary); return theFactory; } catch (Exception e) { String msg = "Could not instantiate the " + subclassName + ". The initialization throw an exception."; throw new InvalidFormatException(msg, e); } }
public static POSTaggerFactory create(String subclassName, byte[] featureGeneratorBytes, Map<String, Object> resources, TagDictionary posDictionary) throws InvalidFormatException { POSTaggerFactory theFactory; if (subclassName == null) { // will create the default factory theFactory = new POSTaggerFactory(null, posDictionary); } else { try { theFactory = ExtensionLoader.instantiateExtension( POSTaggerFactory.class, subclassName); } catch (Exception e) { String msg = "Could not instantiate the " + subclassName + ". The initialization throw an exception."; throw new InvalidFormatException(msg, e); } } theFactory.init(featureGeneratorBytes, resources, posDictionary); return theFactory; }
public static POSTaggerFactory create(String subclassName, byte[] featureGeneratorBytes, Map<String, Object> resources, TagDictionary posDictionary) throws InvalidFormatException { POSTaggerFactory theFactory; if (subclassName == null) { // will create the default factory theFactory = new POSTaggerFactory(null, posDictionary); } else { try { theFactory = ExtensionLoader.instantiateExtension( POSTaggerFactory.class, subclassName); } catch (Exception e) { String msg = "Could not instantiate the " + subclassName + ". The initialization throw an exception."; throw new InvalidFormatException(msg, e); } } theFactory.init(featureGeneratorBytes, resources, posDictionary); return theFactory; }
factory.init(featureGeneratorBytes, resources, dict);
factory.init(featureGeneratorBytes, resources, dict);