private string Convert(string phrase, TokenizerMapConverter tokenizerMapConverter) { var tokenizer = TokenizerFactory.Create(tokenizerMapConverter.Tokenizer); var words = tokenizer.Segment(phrase); var wordsConvert = WordsConverterFactory.Create(tokenizerMapConverter.Converter); return(NamingUtil.ToSingular(wordsConvert.Convert(words))); }
public static string ToNgSelector( string tableName ) { var words = tableName.Split('_'); var converter = new StrikeThroughConverter(); var selector = converter.Convert(words); if (!selector.StartsWith("app-")) { selector = "app-" + selector; } return(NamingUtil.ToSingular(selector)); }
public string Convert(IEnumerable <string> words) { var pascalWords = converter.Convert(words); return(NamingUtil.ToSingular(pascalWords)); }