예제 #1
0
파일: heads.py 프로젝트: rupenp/transforest
def init_sem():
    if headtables[SEM] is not None:
        return

    this = HeadTable()
    headtables[SEM] = this

    this.table_name = "SEM"

    this.rightheaded_nominals = aset("")  # no such thing for semantic

    this.unknown = []


    this.adjective = [aset("$ CD JJ JJR JJS RB RBR RBS WRB"), \
                      aset("ADJP ADVP")]

    this.conjunction = [aset("CC")]
    this.interjection = [aset("INTJ UH")]

    this.noun = [aset("EX NN NNS PRP WP"), \
                 aset("$ NNP NNPS"), \
                 aset("QP NP WP$"), \
                 aset("CD DT IN JJ JJR JJS PDT POS RB WDT")]

    this.preposition = [aset("IN RP TO"), \
                        aset("PP")]

    this.verb = [aset("VP"), \
                 aset("VB VBD VBG VBN VBP VBZ"), \
                 aset("ADJP JJ S SINV SQ TO"), \
                 aset("AUX AUXG MD")]

    set_headtype(this)
예제 #2
0
def init_sem():
	if headtables[SEM] is not None:
		return

	this = HeadTable()
	headtables[SEM] = this

	this.table_name = "SEM"

	this.rightheaded_nominals = aset("")  # no such thing for semantic

	this.unknown = []


	this.adjective = [aset("$ CD JJ JJR JJS RB RBR RBS WRB"), \
					  aset("ADJP ADVP")]

	this.conjunction = [aset("CC")]
	this.interjection = [aset("INTJ UH")]

	this.noun = [aset("EX NN NNS PRP WP"), \
				 aset("$ NNP NNPS"), \
				 aset("QP NP WP$"), \
				 aset("CD DT IN JJ JJR JJS PDT POS RB WDT")]

	this.preposition = [aset("IN RP TO"), \
						aset("PP")]

	this.verb = [aset("VP"), \
				 aset("VB VBD VBG VBN VBP VBZ"), \
				 aset("ADJP JJ S SINV SQ TO"), \
				 aset("AUX AUXG MD")]

	set_headtype(this)
예제 #3
0
파일: heads.py 프로젝트: rupenp/transforest
def init_syn():
    if headtables[SYN] is not None:
        return

    this = HeadTable()
    headtables[SYN] = this

    this.table_name = "SYN"

    this.rightheaded_nominals = aset("NN NNS NNP NNPS $")

    this.unknown = []

    this.adjective = [aset("$ CD JJ JJR JJS RB RBR RBS WRB"), \
                      aset("ADJP ADVP")]

    this.conjunction = [aset("CC")]
    this.interjection = [aset("INTJ UH")]

    this.noun = [aset("POS"), \
                 aset("DT WDT WP$ WP PRP EX"), \
                 aset("NN NNS"), \
                 aset("$ NNP NNPS"), \
                 aset("-NONE- QP NP NP$ WHNP"), \
                 aset("CD IN JJ JJR JJS PDT RB PP")]

    this.preposition = [aset("IN RP TO"), \
                        aset("PP")]

    this.verb = [aset("AUX AUXG MD"), \
                 aset("VB VBD VBG VBN VBP VBZ"), \
                 aset("VP"), \
                 aset("ADJP JJ S SINV SQ TO")]

    set_headtype(this)
예제 #4
0
def init_syn():
	if headtables[SYN] is not None:
		return

	this = HeadTable()
	headtables[SYN] = this

	this.table_name = "SYN"

	this.rightheaded_nominals = aset("NN NNS NNP NNPS $")

	this.unknown = []

	this.adjective = [aset("$ CD JJ JJR JJS RB RBR RBS WRB"), \
					  aset("ADJP ADVP")]

	this.conjunction = [aset("CC")]
	this.interjection = [aset("INTJ UH")]

	this.noun = [aset("POS"), \
				 aset("DT WDT WP$ WP PRP EX"), \
				 aset("NN NNS"), \
				 aset("$ NNP NNPS"), \
				 aset("-NONE- QP NP NP$ WHNP"), \
				 aset("CD IN JJ JJR JJS PDT RB PP")]

	this.preposition = [aset("IN RP TO"), \
						aset("PP")]

	this.verb = [aset("AUX AUXG MD"), \
				 aset("VB VBD VBG VBN VBP VBZ"), \
				 aset("VP"), \
				 aset("ADJP JJ S SINV SQ TO")]

	set_headtype(this)