public void OnPrune(PruneType Prune) { Live.Clear(); Dead.Clear(); Number = 0; _ReadyForHarvest = false; }
private void OnPrune(PruneType Prune) { Summary.WriteMessage(this, "Pruning"); Live.Clear(); Dead.Clear(); }
public WordMapper(List <string> dictionary, PruneType pruneType) { if (dictionary == null) { _dictionary = new List <string>(); } _dictionary = dictionary; _pruneType = pruneType; _suffixer = new PersianSuffixLemmatizer(true, false); }
public void OnPrune(PruneType Prune) { string Indent = " "; string Title = Indent + Clock.Today.ToString("d MMMM yyyy") + " - Pruning " + Name + " from " + Plant.Name; Console.WriteLine(""); Console.WriteLine(Title); Console.WriteLine(Indent + new string('-', Title.Length)); Live.Clear(); Dead.Clear(); }
public PinglishMapping(string mappingFileName, string dicPath, PruneType pruneType) { try { List <PinglishString> list = PinglishConverterUtils.LoadPinglishStrings(mappingFileName); Learn(list, false); m_pinglishDataSet.AddRange(list.RemoveDuplicates()); _suffixer = new PersianSuffixLemmatizer(true); Tools.LoadList(ref _dic, dicPath); _wordMapper = new WordMapper(_dic, pruneType); } catch (Exception ex) { Debug.WriteLine(ex); } }
public PinglishConverter(PinglishConverterConfig config, PruneType pruneType, bool supportTranslating) { if (supportTranslating) { throw new NotImplementedException("Currently not supported"); } ReadExceptionWords(config.ExceptionWordDicPath); _preProcessor = new PreProcessor(); // TODO: Translation is not supported for now _translator = supportTranslating ? new Translator(config.EnToPeDicPath) : new Translator(); if (PruneType.Stem == pruneType) { _transliterater = new PinglishMapping(config.XmlDataPath, config.StemDicPath, pruneType); } else { _transliterater = new PinglishMapping(config.XmlDataPath, config.GoftariDicPath, pruneType); } }
private readonly ITransliterator _transliterater; //this present Transliterator Object public PinglishConverter(PinglishConverterConfig config, PruneType pruneType) : this(config, pruneType, false) { }
private void OnPrune(PruneType Prune) { Structure.PrimaryBudNo = Prune.BudNumber; ZeroLeaves(); }
public void OnPrune(PruneType Prune) { Structure.PrimaryBudNo = Prune.BudNumber; CohortsInitialised = false; ZeroLeaves(); }
public static bool IsValidInDictionary(string word, List <string> dic, PersianSuffixLemmatizer suffixer, PruneType prouneType) { if (PruneType.NoPrune == prouneType) { return(false); } if (dic.Contains(word)) { return(true); } else if (PruneType.Stem == prouneType) { ReversePatternMatcherPatternInfo[] inf = suffixer.MatchForSuffix(word); foreach (ReversePatternMatcherPatternInfo info in inf) { if (dic.Contains(info.BaseWord)) { return(true); } } } return(false); }