Interface IWord

  • All Superinterfaces:
    Cloneable
    All Known Implementing Classes:
    Word

    public interface IWord
    extends Cloneable
    Word Token interface
    Author:
    chenxin
    • Field Detail

      • NAME_POSPEECH

        static final String[] NAME_POSPEECH
      • NUMERIC_POSPEECH

        static final String[] NUMERIC_POSPEECH
      • TIME_POSPEECH

        static final String[] TIME_POSPEECH
      • EN_POSPEECH

        static final String[] EN_POSPEECH
      • MIX_POSPEECH

        static final String[] MIX_POSPEECH
      • PPT_POSPEECH

        static final String[] PPT_POSPEECH
      • PUNCTUATION

        static final String[] PUNCTUATION
      • QUANTIFIER

        static final String[] QUANTIFIER
      • UNRECOGNIZE

        static final String[] UNRECOGNIZE
      • T_MIXED_WORD

        static final int T_MIXED_WORD
        Chinese and English mix word like B超,SIM卡.
        See Also:
        Constant Field Values
      • T_CN_NICKNAME

        static final int T_CN_NICKNAME
        Chinese nickname like: 老陈
        See Also:
        Constant Field Values
      • T_BASIC_LATIN

        static final int T_BASIC_LATIN
        Latin series including the Arabic numbers.
        See Also:
        Constant Field Values
      • T_LETTER_NUMBER

        static final int T_LETTER_NUMBER
        letter number like 'ⅠⅡ'
        See Also:
        Constant Field Values
      • T_OTHER_NUMBER

        static final int T_OTHER_NUMBER
        other number like '①⑩⑽㈩'
        See Also:
        Constant Field Values
      • T_UNRECOGNIZE_WORD

        static final int T_UNRECOGNIZE_WORD
        useless chars like the CJK punctuation
        See Also:
        Constant Field Values
    • Method Detail

      • getValue

        String getValue()
        return the value of the word
      • getLength

        int getLength()
        return the length of the word
      • setLength

        void setLength​(int length)
        self define the length
      • getFrequency

        int getFrequency()
        return the frequency of the word, use only when the word's length is one.
      • setFrequency

        void setFrequency​(int freq)
        set the frequency of the word
      • getType

        int getType()
        return the type of the word
      • setType

        void setType​(int type)
        set the type of the word
      • setPosition

        void setPosition​(int pos)
        set the position of the word
      • getPosition

        int getPosition()
        return the start position of the word.
      • getEntity

        String[] getEntity()
        get the entity name array of the word
      • getEntity

        String getEntity​(int idx)
        get the specified entity by index
      • setEntity

        void setEntity​(String[] entity)
        set the entity name array of the word
      • setEntityForNull

        void setEntityForNull​(String[] entity)
      • addEntity

        void addEntity​(String e)
        append a new entity
      • getPinyin

        String getPinyin()
        return the pinyin of the word
      • getSyn

        SynonymsEntry getSyn()
        return the Synonyms' entry of the word.
      • getPartSpeech

        String[] getPartSpeech()
        return the part of speech of the word.
      • setPartSpeech

        void setPartSpeech​(String[] ps)
      • setPartSpeechForNull

        void setPartSpeechForNull​(String[] ps)
      • setPinyin

        void setPinyin​(String py)
        set the pinyin of the word
      • addPartSpeech

        void addPartSpeech​(String ps)
        add a new part to speech to the word.
      • getParameter

        String getParameter()
        return the additional parameters
      • setParameter

        void setParameter​(String param)
        set the string parameters
      • equals

        boolean equals​(Object o)
        you have to rewrite the #equals method cause the Jcseg require it
        Overrides:
        equals in class Object
      • clone

        IWord clone()
        make clone available