Package relations

Class BasicChunk


  • public class BasicChunk
    extends Object
    Author:
    Chinh
    • Field Detail

      • extracted

        public boolean extracted
      • is_merged

        public boolean is_merged
      • init

        public boolean init
      • ccList

        public static final String[] ccList
      • appoList

        public static final String[] appoList
      • appoMap

        public static final Set<String> appoMap
      • ccMap

        public static final Set<String> ccMap
    • Constructor Detail

      • BasicChunk

        public BasicChunk()
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Check whether this basic chunk is empty.
      • addChunk

        public void addChunk​(BasicChunk bc)
      • removeTrg

        public void removeTrg​(Word tg)
      • inChunkTrg

        public boolean inChunkTrg​(Word tg,
                                  String[] tokens)
        Check whether a given trigger is in_chunk form
        Parameters:
        tg -
      • isSameRole

        public boolean isSameRole​(Word tg1,
                                  Word tg2,
                                  String[] tokens)
        Check whether two trigger has the same role (i.e have the same arguments)
        Parameters:
        tg1 -
        tg2 -
        tokens -
        Returns:
      • isSameChunk

        public boolean isSameChunk​(Word tg,
                                   Word pr)
        Check whether in the same chunk but not in_chunk form
        Parameters:
        tg -
        pr -
        Returns:
      • mergeNP

        public void mergeNP()
      • findCoordinator

        public void findCoordinator​(List<Chunk> ls)
      • proCount

        public int proCount()
      • trgCount

        public int trgCount()
      • containsKey

        public boolean containsKey​(Word key)
      • belongTO

        public boolean belongTO​(Word trg,
                                Word pr)
      • belongTO

        public boolean belongTO​(Word trg,
                                Word pr,
                                Word pr2)
      • countChunks

        public int countChunks​(Word w1,
                               Word w2)
      • getChunk

        public Chunk getChunk​(int pos)
      • isQualify

        public boolean isQualify()
      • getChunkPos

        public int getChunkPos​(int pos)
      • inChunk

        public boolean inChunk​(Word trg,
                               Word pro)
      • inChunkTG

        public boolean inChunkTG​(Word trg1,
                                 Word trg2)
        Two tg in the same chunk ; for learning rule only
        Parameters:
        trg1 -
        trg2 -
      • addChunk

        public void addChunk​(Chunk c)
      • addPro

        public void addPro​(Word pro)
      • addTrg

        public void addTrg​(Word trg)
      • printChunk

        public void printChunk()
      • toString

        public String toString()
        Operation: 1. Check in_chunk: trg and pro in the same chunk, pro preceeds trg, trig's POS is a NN if trg's POS is VBx and trg is a reg event -> PRO is used as cause 2. Find connection: NP prep NP : if trig is NP and not (in_chunk) use known list of preps to connect with another NP 3. Check role: if there is more than one trig in chunk, check relationship (equals, dependent) between trgs two trig are equal if they connected by CC (i.e. and,or) and has the same POS 4. Divide into simple/binding/reg event to make extraction process simpler 5. How to store extracted events? How to assign ID?-> List of extracted event, reference via object ID
        Overrides:
        toString in class Object