internal ThotWordAlignmentModel(IntPtr handle) { Handle = handle; _sourceWords = new ThotWordVocabulary(Handle, true); _targetWords = new ThotWordVocabulary(Handle, false); _closeOnDispose = false; }
public ThotWordAlignmentModel() { Handle = Thot.swAlignModel_create(); _sourceWords = new ThotWordVocabulary(Handle, true); _targetWords = new ThotWordVocabulary(Handle, false); _closeOnDispose = true; }
public ThotWordAlignmentModel(string prefFileName, bool createNew = false) { if (!createNew && !File.Exists(prefFileName + ".src")) { throw new FileNotFoundException("The word alignment model configuration could not be found."); } _prefFileName = prefFileName; Handle = createNew || !File.Exists(prefFileName + ".src") ? Thot.swAlignModel_create() : Thot.swAlignModel_open(_prefFileName); _sourceWords = new ThotWordVocabulary(Handle, true); _targetWords = new ThotWordVocabulary(Handle, false); _closeOnDispose = true; }