Exemple #1
0
def end_element(name):
    # logger.debug("\n============\n\tEND: "+str(name)+"\n============\n")
    if name == SENTENCE:
        # print ".......SENTENCE"
        procSentEnd()
    elif CHUNK.match(name):
        # print ".......CHUNK"
        procChunkEnd(name)
    elif name == TOKEN:
        # print ".......TOKEN"
        procTokEnd()
    elif CHUNKVERBAL.match(name):
        # print ".......CHUNKVERBAL"
        procChunkVerbalEnd()
    elif name == EVENT:
        # print ".......EVENT"
        procEventEnd()
    elif name == TIMEX:
        # print ".......TIMEX"
        procTimexEnd()
    elif name == CHUNKHEAD:
        # print ".......CHUNKHEAD"
        procChunkHeadEnd()

    if name in EMPTY_TAGS:  # Hacking, but anyway!
        pass
    elif name == TIMEML:
        pass
    else:
        currentDoc.addDocNode(endElementString(name))
Exemple #2
0
def end_element(name):
    #logger.debug("\n============\n\tEND: "+str(name)+"\n============\n")
    if name == SENTENCE:
        #print ".......SENTENCE"
        procSentEnd()
    elif CHUNK.match(name):
        #print ".......CHUNK"
        procChunkEnd(name)
    elif name == TOKEN:
        #print ".......TOKEN"
        procTokEnd()
    elif CHUNKVERBAL.match(name):
        #print ".......CHUNKVERBAL"
        procChunkVerbalEnd()
    elif name == EVENT:
        #print ".......EVENT"
        procEventEnd()
    elif name == TIMEX:
        #print ".......TIMEX"
        procTimexEnd()
    elif name == CHUNKHEAD:
        #print ".......CHUNKHEAD"
        procChunkHeadEnd()

    if name in EMPTY_TAGS:  #Hacking, but anyway!
        pass
    elif name == TIMEML:
        pass
    else:
        currentDoc.addDocNode(endElementString(name))
Exemple #3
0
def end_element(name):
    debug('<\\' + name + '>')
    if name == SENTENCE:
        procSentEnd()
    elif CHUNK.match(name):
        procChunkEnd(name)
    elif name == TOKEN:
        procTokEnd()
    currentDoc.addDocNode(endElementString(name))
Exemple #4
0
def end_element(name):
    debug('<\\' + name + '>')
    if name == SENTENCE:
        procSentEnd()
    elif CHUNK.match(name):
        procChunkEnd(name)
    elif name == TOKEN:
        procTokEnd()
    currentDoc.addDocNode(endElementString(name))