PHP 클래스 TextAnalysis\Models\Wordnet\Synset

저자: yooper
상속: use trait TextAnalysis\Traits\WordnetPointerSymbolMap
파일 보기 프로젝트 열기: yooper/php-text-analysis 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$definition Each synset contains a gloss. A gloss is represented as a vertical bar (| ), followed by a text string that continues until the end of the line. The gloss may contain a definition, one or more example sentences, or both.
$frames In data.verb only, a list of numbers corresponding to the generic verb sentence frames for word s in the synset. frames is of the form: f_cnt + f_num w_num [ + f_num w_num...] where f_cnt a two digit decimal integer indicating the number of generic frames listed, f_num is a two digit decimal integer frame number, and w_num is a two digit hexadecimal integer indicating the word in the synset that the frame applies to. As with pointers, if this number is 00 , f_num applies to all word s in the synset. If non-zero, it is applicable only to the word indicated. Word numbers are assigned as described for pointers. Each f_num w_num pair is preceded by a +
$lexFilenum Two digit decimal integer corresponding to the lexicographer file name containing the synset.
$lexIds One digit hexadecimal integer that, when appended onto lemma , uniquely identifies a sense within a lexicographer file. lex_id numbers usually start with 0 , and are incremented as additional senses of the word are added to the same file, although there is no requirement that the numbers be consecutive or begin with 0 . Note that a value of 0 is the default, and therefore is not present in lexicographer files.
$linkedSynsets A pointer from this synset to another. ptr is of the form: pointerSymbol synsetOffset pos source/target. where synsetOffset is the byte offset of the target synset in the data file corresponding to pos .
$pCnt Three digit decimal integer indicating the number of pointers from this synset to other synsets. If p_cnt is 000 the synset has no pointers.
$srcWordIdx integer
$synsetOffset Current byte offset in the file represented as an 8 digit decimal integer.
$targetWordIdx integer
$wCnt Two digit hexadecimal integer indicating the number of words in the synset.
$words ASCII form of a word as entered in the synset by the lexicographer, with spaces replaced by underscore characters (_ ). The text of the word is case sensitive, in contrast to its form in the corresponding index. pos file, that contains only lower-case forms. In data.adj , a word is followed by a syntactic marker if one was specified in the lexicographer file. A syntactic marker is appended, in parentheses, onto word without any intervening spaces.

공개 메소드들

메소드 설명
__construct ( $synsetOffset, $pos )
addLinkedSynset ( Synset &$synset ) : Synset;
addWord ( string $word, integer $lexId )
getDefinition ( ) : string
getLinkedSynsets ( ) : Synset[]
getSrcWordIdx ( ) : integer
getTargetWordIdx ( ) : integer
getWords ( ) : string[]
setDefinition ( string $definition )
setSrcWordIdx ( integer $wordIdx )
setTargetWordIdx ( integer $wordIdx )

메소드 상세

__construct() 공개 메소드

public __construct ( $synsetOffset, $pos )

addLinkedSynset() 공개 메소드

public addLinkedSynset ( Synset &$synset ) : Synset;
$synset Synset
리턴 Synset;

addWord() 공개 메소드

public addWord ( string $word, integer $lexId )
$word string
$lexId integer

getDefinition() 공개 메소드

public getDefinition ( ) : string
리턴 string

getLinkedSynsets() 공개 메소드

public getLinkedSynsets ( ) : Synset[]
리턴 Synset[] Returned synsets are not fully hydrated

getSrcWordIdx() 공개 메소드

public getSrcWordIdx ( ) : integer
리턴 integer

getTargetWordIdx() 공개 메소드

public getTargetWordIdx ( ) : integer
리턴 integer

getWords() 공개 메소드

public getWords ( ) : string[]
리턴 string[]

setDefinition() 공개 메소드

public setDefinition ( string $definition )
$definition string

setSrcWordIdx() 공개 메소드

public setSrcWordIdx ( integer $wordIdx )
$wordIdx integer

setTargetWordIdx() 공개 메소드

public setTargetWordIdx ( integer $wordIdx )
$wordIdx integer

프로퍼티 상세

$definition 보호되어 있는 프로퍼티

Each synset contains a gloss. A gloss is represented as a vertical bar (| ), followed by a text string that continues until the end of the line. The gloss may contain a definition, one or more example sentences, or both.
protected $definition

$frames 보호되어 있는 프로퍼티

In data.verb only, a list of numbers corresponding to the generic verb sentence frames for word s in the synset. frames is of the form: f_cnt + f_num w_num [ + f_num w_num...] where f_cnt a two digit decimal integer indicating the number of generic frames listed, f_num is a two digit decimal integer frame number, and w_num is a two digit hexadecimal integer indicating the word in the synset that the frame applies to. As with pointers, if this number is 00 , f_num applies to all word s in the synset. If non-zero, it is applicable only to the word indicated. Word numbers are assigned as described for pointers. Each f_num w_num pair is preceded by a +
protected $frames

$lexFilenum 보호되어 있는 프로퍼티

Two digit decimal integer corresponding to the lexicographer file name containing the synset.
protected $lexFilenum

$lexIds 보호되어 있는 프로퍼티

One digit hexadecimal integer that, when appended onto lemma , uniquely identifies a sense within a lexicographer file. lex_id numbers usually start with 0 , and are incremented as additional senses of the word are added to the same file, although there is no requirement that the numbers be consecutive or begin with 0 . Note that a value of 0 is the default, and therefore is not present in lexicographer files.
protected $lexIds

$linkedSynsets 보호되어 있는 프로퍼티

A pointer from this synset to another. ptr is of the form: pointerSymbol synsetOffset pos source/target. where synsetOffset is the byte offset of the target synset in the data file corresponding to pos .
protected $linkedSynsets

$pCnt 보호되어 있는 프로퍼티

Three digit decimal integer indicating the number of pointers from this synset to other synsets. If p_cnt is 000 the synset has no pointers.
protected $pCnt

$srcWordIdx 보호되어 있는 프로퍼티

protected int $srcWordIdx
리턴 integer

$synsetOffset 보호되어 있는 프로퍼티

Current byte offset in the file represented as an 8 digit decimal integer.
protected $synsetOffset

$targetWordIdx 보호되어 있는 프로퍼티

protected int $targetWordIdx
리턴 integer

$wCnt 보호되어 있는 프로퍼티

Two digit hexadecimal integer indicating the number of words in the synset.
protected $wCnt

$words 보호되어 있는 프로퍼티

ASCII form of a word as entered in the synset by the lexicographer, with spaces replaced by underscore characters (_ ). The text of the word is case sensitive, in contrast to its form in the corresponding index. pos file, that contains only lower-case forms. In data.adj , a word is followed by a syntactic marker if one was specified in the lexicographer file. A syntactic marker is appended, in parentheses, onto word without any intervening spaces.
protected $words