PluralizationService.IsSingular(String) 方法

定义

确定指定的单词是否为单数形式。Determines whether the specified word is singular.

public:
 abstract bool IsSingular(System::String ^ word);
public abstract bool IsSingular (string word);
abstract member IsSingular : string -> bool
Public MustOverride Function IsSingular (word As String) As Boolean

参数

word
String

要分析的值。The value to be analyzed.

返回

Boolean

如果单词为单数形式,则为 true;否则为 falsetrue if the word is singular; otherwise, false.

注解

PluralizationService类应用英语规则来构造单词的复数形式。The PluralizationService class applies English rules for constructing plural and singular forms of words. 若要将服务扩展到其他语言,请使用 PluralizationService 类上的 EntityModelSchemaGeneratorTo extend the service to other languages, use the PluralizationService on the EntityModelSchemaGenerator class.

IsSingularIsPlural 方法 true 对于同一个单词可以返回。Both the IsSingular and IsPlural methods can return true for the same word. 例如,这两种方法都将 true 为单词 "鱼" 返回。For example, both methods will return true for the word "fish".

适用于