Presentation is loading. Please wait.

Presentation is loading. Please wait.

HW7 Extracting Arguments for % Ang Sun March 25, 2012.

Similar presentations


Presentation on theme: "HW7 Extracting Arguments for % Ang Sun March 25, 2012."— Presentation transcript:

1 HW7 Extracting Arguments for % Ang Sun asun@cs.nyu.edu March 25, 2012

2 Outline File Format Training – Generating Training Examples – Extracting Features – Training of MaxEnt Models Decoding Scoring

3 File Format Statistics Canada said service-industry output in August rose 0.4 % from July.

4 Generating Training Examples – Positive Example Only one positive example for a sentence The one with the annotation ARG1

5 Generating Training Examples – Negative Examples Two methods! Method 1: consider any token that has one of the following POSs – NN 1150 – NNS 905 – NNP 205 – JJ 25 – PRP 24 – CD 21 – DT 16 – NNPS 13 – VBG 2 – FW 1 – IN 1 – RB 1 – VBZ 1 – WDT 1 – WP 1 Too many negative examples!

6 Generating Training Examples – Negative Examples Two methods! Method 2: only consider head tokens

7 Extracting Features f:candToken=output

8 Extracting Features f:tokenBeforeCand=service-industry

9 Extracting Features f:tokenAfterCand=in

10 Extracting Features f: tokensBetweenCandPRED=in_August_rose_0.4

11 Extracting Features f: numberOfTokensBetween=4

12 Extracting Features f: exisitVerbBetweenCandPred=true

13 Extracting Features f: exisitSUPPORTBetweenCandPred=true

14 Extracting Features f:candTokenPOS=NN

15 Extracting Features f:posBeforeCand=NN

16 Extracting Features f:posAfterCand=IN

17 Extracting Features f: possBetweenCandPRED=IN_NNP_VBD_CD

18 Extracting Features f: BIOChunkChain= I-NP_B-PP_B-NP_B-VP_B-NP_I-NP

19 Extracting Features f: chunkChain= NP_PP_NP_VP_NP

20 Extracting Features f: candPredInSameNP=False

21 Extracting Features f: candPredInSameVP=False

22 Extracting Features f: candPredInSamePP=False

23 Extracting Features f: shortestPathBetweenCandPred= NP_NP-SBJ_S_VP_NP-EXT

24 Training of MaxEnt Model – Each training example is one line candToken=output..... class=Y candToken=Canada..... Class=N – Put all examples in one file, the training file – Use the MaxEnt wrapper or the program you wrote in HW5 to train your relation extraction model

25 Decoding For each sentence – Generate testing examples as you did for training One example per feature line (without class=(Y/N)) – Apply your trained model to each of the testing examples – Choose the example with the highest probability returned by your model as the ARG1 – So there should be and must be one ARG1 for each sentence

26 Scoring As you are required to tag only one ARG1 for each sentence Your system will be evaluated based on accuracy – Accuracy = #correct_ARG1s / #sentences

27 Good Luck!


Download ppt "HW7 Extracting Arguments for % Ang Sun March 25, 2012."

Similar presentations


Ads by Google