EntityInfo class
實體的擴充資訊,包括$instance數據。 實體的擴充資訊,包括$instance數據。
屬性
| coverage | 實體涵蓋原始語句的 (0-1.0) 數目。 |
| end | 放置實體以語句結尾的位置。 |
| name | 實體的名稱。 |
| operation | 要套用至實體的作業。 |
| priority | 相較於其他優先順序最高的實體,實體的相對優先順序。 |
| property | 如果有的話,屬性值。 |
| root |
找到此實體的根實體。 |
| score | 實體的分數 (0-1.0)。 |
| start | 在語句中啟動實體的位置。 |
| text | 導致實體的原始文字。 |
| type | 實體的類型。 |
| value | 實體的值。 |
| when |
辨識實體時的事件計數器。 |
方法
| alternative(Partial<Entity |
如果實體來自語句中完全相同的文字,則傳回 true。 |
| covers(Partial<Entity |
傳回 true 實體文字完全包含另一個實體文字。 |
| is |
如果實體相同,則傳回 true。 |
| overlaps(Partial<Entity |
如果實體共用語句中的文字,則傳回 true。 |
| shares |
如果實體共用相同的根目錄,則傳回 true。 |
| to |
將實體列印為字串。 |
屬性詳細資料
coverage
實體涵蓋原始語句的 (0-1.0) 數目。
coverage: number
屬性值
number
end
放置實體以語句結尾的位置。
end: number
屬性值
number
name
實體的名稱。
name: string
屬性值
string
operation
要套用至實體的作業。
operation: string
屬性值
string
priority
相較於其他優先順序最高的實體,實體的相對優先順序。
priority: number
屬性值
number
property
如果有的話,屬性值。
property: string
屬性值
string
rootEntity
找到此實體的根實體。
rootEntity: string
屬性值
string
score
實體的分數 (0-1.0)。
score: number
屬性值
number
start
在語句中啟動實體的位置。
start: number
屬性值
number
text
導致實體的原始文字。
text: string
屬性值
string
type
實體的類型。
type: string
屬性值
string
value
實體的值。
value: any
屬性值
any
whenRecognized
辨識實體時的事件計數器。
whenRecognized: number
屬性值
number
方法詳細資料
alternative(Partial<EntityInfo>, Partial<EntityInfo>)
如果實體來自語句中完全相同的文字,則傳回 true。
static function alternative(source: Partial<EntityInfo>, entity: Partial<EntityInfo>): boolean
參數
- source
-
Partial<EntityInfo>
來源實體。
- entity
-
Partial<EntityInfo>
要比較的實體。
傳回
boolean
如果實體來自語句中完全相同的文字,則為 True,否則為 false。
covers(Partial<EntityInfo>, Partial<EntityInfo>)
傳回 true 實體文字完全包含另一個實體文字。
static function covers(source: Partial<EntityInfo>, entity: Partial<EntityInfo>): boolean
參數
- source
-
Partial<EntityInfo>
來源實體。
- entity
-
Partial<EntityInfo>
要比較的實體。
傳回
boolean
如果實體文字完全包含另一個實體文字,則為 True,否則為 false。
isSameEntity(Partial<EntityInfo>, Partial<EntityInfo>)
如果實體相同,則傳回 true。
static function isSameEntity(source: Partial<EntityInfo>, entity: Partial<EntityInfo>): boolean
參數
- source
-
Partial<EntityInfo>
來源實體。
- entity
-
Partial<EntityInfo>
要比較的實體。
傳回
boolean
如果實體相同,則為 True,否則為 false。
overlaps(Partial<EntityInfo>, Partial<EntityInfo>)
如果實體共用語句中的文字,則傳回 true。
static function overlaps(source: Partial<EntityInfo>, entity: Partial<EntityInfo>): boolean
參數
- source
-
Partial<EntityInfo>
來源實體。
- entity
-
Partial<EntityInfo>
要比較的實體。
傳回
boolean
如果實體在語句中共用文字,則為 True,否則為 false。
sharesRoot(Partial<EntityInfo>, Partial<EntityInfo>)
如果實體共用相同的根目錄,則傳回 true。
static function sharesRoot(source: Partial<EntityInfo>, entity: Partial<EntityInfo>): boolean
參數
- source
-
Partial<EntityInfo>
來源實體。
- entity
-
Partial<EntityInfo>
要比較的實體。
傳回
boolean
如果實體共用相同的根目錄,則為 True,否則為 false。
toString(Partial<EntityInfo>)
將實體列印為字串。
static function toString(source: Partial<EntityInfo>): string
參數
- source
-
Partial<EntityInfo>
來源實體。
傳回
string
表示目前物件的字串。