Humanizr.net忽略word/acronym
Humanizr.net ignore word/acronym
我正在遍历一组字符串并使用 Humanizr.net。
这样我就可以将每个字符串更正为句子大小写。
例如
List<string> mystrings = new List<string>();
mystrings.Add("my string one");
mystrings.Add("my string two aBC");
mystrings.Add("My String Three");
foreach (string x in mystrings)
{
Console.WriteLine(x.Humanize());
}
我得到的输出是这样的
//what i am getting
//----------------------
//My string one
//My string two a BC
//My string three
我想知道是否可以添加排除项或要忽略的词,以便我得到这个
//what i want
//----------------------
//My string two aBC
谢谢
我想出了以下解决方案来代替答案。
有一个数据存储数据库或一个简单文件(这是我在我的案例中使用的),其中包含我不希望 Humanizer 一起转换的已知单词和首字母缩略词列表Humanizer 将其转换成什么。
然后我在 Humanizer 调用后进行简单的查找和替换。
虽然这不是最优雅的解决方案,但它现在适用于我的情况。
我正在遍历一组字符串并使用 Humanizr.net。
这样我就可以将每个字符串更正为句子大小写。
例如
List<string> mystrings = new List<string>();
mystrings.Add("my string one");
mystrings.Add("my string two aBC");
mystrings.Add("My String Three");
foreach (string x in mystrings)
{
Console.WriteLine(x.Humanize());
}
我得到的输出是这样的
//what i am getting
//----------------------
//My string one
//My string two a BC
//My string three
我想知道是否可以添加排除项或要忽略的词,以便我得到这个
//what i want
//----------------------
//My string two aBC
谢谢
我想出了以下解决方案来代替答案。
有一个数据存储数据库或一个简单文件(这是我在我的案例中使用的),其中包含我不希望 Humanizer 一起转换的已知单词和首字母缩略词列表Humanizer 将其转换成什么。
然后我在 Humanizer 调用后进行简单的查找和替换。
虽然这不是最优雅的解决方案,但它现在适用于我的情况。