6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6ZddddddbdedfdgdhfgZdiedjdkfdledjdmfdnedodpfdqedqefdredqefdsedtdudvdufdwedtdxdvdyfdzedjd{fd|edjd}fd~edjdfg ZdZdZ dZ dZ dZ edddddodddddddddddZ edddddoddddjddddddddd Zedddddoddddddddddddd ZedodddddZeddddZedodddddddZedodddddddddddddZedodddddZdZdZedodZedodZdZdZddddddZdZdZdZdZ dZ!e"Z#dZ$e"Z%dZ&dZ'dZ(e"Z)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2ddZ3dZ4dZ5dZ6dZ7ddZ8dZ9dZ:dZ;dZ<ddZ=ddZ>ddZ?dZ@ddZAddZBdZCRS(s A graphical tool for exploring the regular expression based chunk parser ``nltk.chunk.RegexpChunkParser``. See ``HELP`` for instructional text. sCoordinating conjunctiontCCsPossessive pronounsPRP$sCardinal numbertCDtAdverbtRBt DeterminertDTsAdverb, comparativetRBRsExistential theretEXsAdverb, superlativetRBSs Foreign wordtFWtParticletRPt AdjectivetJJttotTOsAdjective, comparativetJJRt InterjectiontUHsAdjective, superlativetJJSsVerb, base formtVBsList item markertLSsVerb, past tensetVBDtModaltMDs Noun, pluraltNNSsNoun, singular or maspstNNsVerb, past participletVBNsVerb,3rd ps. sing. presenttVBZsProper noun, singulartNNPsProper noun pluraltNNPSs wh-determinertWDTt PredeterminertPDTs wh-pronountWPsPossessive endingtPOSsPossessive wh-pronounsWP$sPersonal pronountPRPs wh-adverbtWRBsopen parenthesist(sclose parenthesist)s open quotes``tcommat,s close quotes''tperiodt.spound sign (currency marker)t#sdollar sign (currency marker)t$sPreposition/subord. conjunctiontINs#Symbol (mathematical or scientific)tSYMsVerb, gerund/present participletVBGsVerb, non-3rd ps. sing. presenttVBPtcolont:tHelpt20s-Welcome to the regular expression chunk-parser grammar editor. You can use this editor to develop and test chunk parser grammars based on NLTK's RegexpChunkParser class. Use this box ('Help') to learn more about the editor; click on the tabs for help on specific topics: Rules: grammar rule types Regexps: regular expression syntax Tags: part of speech tags Use the upper-left box ('Grammar') to edit your grammar. Each line of your grammar specifies a single 'rule', which performs an action such as creating a chunk or merging two chunks. The lower-left box ('Development Set') runs your grammar on the development set, and displays the results. Your grammar's chunks are highlighted, and the correct (gold standard) chunks are underlined. If they match, they are displayed in green; otherwise, they are displayed in red. The box displays a single sentence from the development set at a time; use the scrollbar or the next/previous buttons view additional sentences. The lower-right box ('Evaluation') tracks the performance of your grammar on the development set. The 'precision' axis indicates how many of your grammar's chunks are correct; and the 'recall' axis indicates how many of the gold standard chunks your system generated. Typically, you should try to design a grammar that scores high on both metrics. The exact precision and recall of the current grammar, as well as their harmonic mean (the 'f-score'), are displayed in the status bar at the bottom of the window.tRulest10s

{...regexp...}

Chunk rule: creates new chunks from words matching regexp.

}...regexp...{

Chink rule: removes words matching regexp from existing chunks.

...regexp1...}{...regexp2...

Split rule: splits chunks that match regexp1 followed by regexp2 in two.

...regexp...{}...regexp...

Merge rule: joins consecutive chunks that match regexp1 and regexp2 tRegexpss10 60sX

Pattern Matches...

<T> a word with tag T (where T may be a regexp). x? an optional x x+ a sequence of 1 or more x's x* a sequence of 0 or more x's x|y x or y . matches any character (x) Treats x as a group # x... Treats x... (to the end of the line) as a comment \C matches character C (useful when C is a special character like + or #)

Examples:

Matches "cow/NN" Matches "green/NN" Matches "eating/VBG" Matches "ate/VBD"
Matches "on/IN the/DT car/NN" ? Matches "ran/VBD" Matches "slowly/RB ate/VBD" <\#> # This is a comment... Matches "#/# 100/CD" tTagss

Part of Speech Tags:

s s <>s tredt foregrounds#a00tgreens#080t highlightt backgrounds#dddt underlineth1tindenttlmargin1itlmargin2t hangindentii<tvars#88ftregexps#ba7tmatchs#6a6iig?g{Gz?g{Gz?twidthi(theighti s#efethighlightbackgroundthighlightthicknesstrelieftgroovetborderitwraptwords#555iFi s#eefttabsis#9bbtfamilyt helveticatsizeis#777tpadxtpadyii,itactivebackgrounds#abaicCsdtjdd|}tjdd|}tjdd|}|j}tjdd|}|S( Ns((\\.|[^#])*)(#.*)?s\1s +t s \s+s s ([^\\])\$s\1\\$(tretsubtstrip(tselftgrammar((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pytnormalize_grammars  R ttNPcCs||_|dkr!|j}n||_|dkr|dkrTtjd}q|dkrotj}qtd|nd|_||_ d|_ d|_ ||_ ||_ d|_d|_g|_d|_d|_d|_d|_td||_t}|_|jd|jd |jd |jt||_|jjd |j ||j!||j"||j#||j$j%|r|j$j&d |d |j$j'ddn|j(d|j)dS(s :param devset_name: The name of the development set; used for display & for save files. If either the name 'treebank' or the name 'conll2000' is used, and devset is None, then devset will be set automatically. :param devset: A list of chunked sentences :param grammar: The initial grammar to display. :param tagset: Dictionary from tags to string descriptions, used for the help page. Defaults to ``self.TAGSET``. R s train.txtttreebanksUnknown development set %siit chunk_labels+50+50sRegexp Chunk Parser Apps idtends tinserts1.0N(*t _chunk_labeltNonetTAGSETttagsetR t chunked_sentsRt ValueErrortchunkerRptnormalized_grammartgrammar_changedtdevsett devset_namet devset_indext_last_keypresst_historyt_history_indext _eval_grammart_eval_normalized_grammart _eval_indexRt _eval_scoreR ttoptgeometryttitletbindtdestroyRt _devset_sizetsett _init_fontst _init_widgetst_init_bindingst _init_menubart grammarboxtfocusRwtmark_sett show_devsettupdate(RoRRRpRuR{R((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyt__init__sP                           cs|jdj|jdj|jdj|jdj|jdfd|jdfdjjdjjjdjjjdjjjd jdS( Ns s s s s cs jS(N(t save_grammar(te(Ro(sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pytmss cs jS(N(t load_grammar(R(Ro(sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRnss (Rt _devset_nextt _devset_prevttoggle_show_traceRRtevalboxt _eval_plot(RoR((Rosj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRhscCst||_|jjdtjjddd|jj |_tjjdddt|jjdd |_ dS(NiReRfRgi( Rt_sizeRttkintertfonttFonttgett_fonttintt _smallfont(RoR((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRvs c Cs*t|}t|dd}|jddddd|j|jdddddd d|j|jdd dddd d|j|jdd dd d|j|jddddd|jdd|jddddd|t|dd}|jddd|j ddddd|j |jddd|j ddddd|j |jddd|j ddddd|j |jddd|j ddddd|j |jddd|j ddddd|j |jddddd|t|dd}|jdd d|j dd!d|j |jdd"d|j dd#d|j |jdd$d|j dd%d|j |jdd&d|j dd'd|j |jdd(ddd|t|dd}|jdd)ddd|j |jdd*ddd||jd|dS(+NttearoffitlabelsReset ApplicationRRtcommandsSave Current Grammart acceleratorsCtrl-ss Load GrammarsCtrl-osSave Grammar Historyi tExitisCtrl-qtFiletmenutTinytvariabletvaluei tSmallitMediumitLargeitHugei"tViews 50 sentencesi2s 100 sentencesids 200 sentencesis 500 sentencesisDevelopment-SettAboutRG(Rt add_commandtresetRRt save_historyRt add_cascadetadd_radiobuttonRtresizeRtset_devset_sizetabouttconfig(Rotparenttmenubartfilemenutviewmenut devsetmenuthelpmenu((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRs^          cGs$|jr|jn |jdS(Ntbreak(t_showing_traceRt show_trace(RoR((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRs   ic Os|jd|jj}|jd|jj}|jjd|jjd|dddddd d d }|jj|dd |d}}|jj|||d|ddd d ddd}d|jj|dd}} |jd} |jj|jj dd|ddd| d| |jj|jj d| dddd| d| |j jryt |j dkryd} } d} }xt dtt |j |jdD]\}|j | \}}}}t|| } t||}t|| } t|| } qWt| dd} t|dd}t| dd} t| dd} nd} }d} } xt dD]}||||d|| |}| | ||d| | | }||ko|knr"|jj|||| ddn||ko9| knr|jj||||ddqqW|jj|||| |jj|| || |jj|d| ddddd dd| |jj|d|ddddd dd| |jj|| ddddd d dd||jj|| dddddd dd| d}}xpt|j D]_\}\}}}}|||||| |}| | ||| | | }||jkr<|jj|d|d|d|ddd!dd"d#|dd$|dd%|d|jd ddd |j ddddt|dddd>d |j ddddt|dd?ddd |j dddd@|jd#d$d"tj"jdAd dBdCdDj"jdEdCdDdFdGj"jdHd dIj"jdJdFdKdLdMj"jdNdOdPdLdMj"jdQdFdGjjdQd dRjjdSdFdTjjdUdFdVjjdWdFdXjjdYdZddOd[dS(\NitweightiiiiiRRsGrammar:thighlightcolortblackRQtcolumntrowtstickytSWtNEWSRtNWStyscrollcommandtEWs Prev GrammartsideRs Next GrammartSs cs j|S(N(t show_help(Rttab(Ro(sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRsR\R[telidestag-%stexpandRtbothsDevelopment Set:RRtorientthoriztxscrollcommandtbottomRisPrev Example (Ctrl-p)sNext Example (Ctrl-n)s Show exampletstatetdisableds Show traces Evaluation:t columnspanRtZoomtLinestHistoryi tNEWRhRii iistrue-poss#afaRRRs false-negRNs#800s false-poss#faattraces#666Rbtnonet wrapindentRViterrors#fectcomments#840tangles#00ftbraces#0a0RWRUi((:Rt _FRAME_PARAMStgrid_columnconfiguretgrid_rowconfigureRRt_GRAMMARBOX_PARAMSRRt grammarlabeltgridRtyviewRRRt _history_prevt_BUTTON_PARAMStpackt _history_nextRt_HELPBOX_PARAMSthelpboxthelptabsRtHELPRt_HELPTAB_SPACERt configuret tag_configRt HELP_AUTOTAGR*t_DEVSETBOX_PARAMSt devsetboxt devsetlabelt_devset_scrollt devset_scrolltxviewtdevset_xscrollRRRt devset_buttonRt trace_buttonRRRRRRRRRRt_STATUS_PARAMSR(RoRtframe0tgrammar_scrollbarRtframe3t helptab_frameRR+ttabstopsRRRtparamsthelp_scrollbartframe4tframe1tframe2((Rosj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyR|s   %  %%    %  *   ...cs=t|_d|jd|]4}ttD]}||f|fVqqdS(N(RR(t.0Rtj(tcharnum(sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pys 1scss#|]}||ddfVqdS(iN((RiR((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pys 4sisStart: R:send -2c linestartsend -2cs Apply %s: s R<strue-poss false-negs false-poss Finished. idg333333?(!RRR\R[RURRRRRVR~RyRwttag_addRtrulesRRR RtdictRRktlinenumRR t_chunkst intersectiont _color_chunkRRRZR(RoRt gold_treeRmttagseqtwordnumRctposRR~t test_treet gold_chunkst test_chunkstchunk((Rksj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRsT    $ % ) c Csd|jd<|jjddx|jD]\}}}||kr|jddjdtt|jjdd D}|j |j |j |jj d ||jj d|dd }x|j D]\}}d ||f}xtj||D]} |jjd|| jd|| jd|jjd||| jd|| jd|jjd|| jd|| jdqWqWq*|j |j |jq*Wd|jd>s css|]}d|VqdS(s %s %sN((Rititem((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pys ZstkeycSs4tjd|dr&d|dfp3d|dfS(Ns\w+ii(RlRZ(tt_w((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyR[sRdis1.0 + %d charss(?s)(<%s>)(.*?)()R,istag-%siiR4s (RMRROtreplacetjointsortedtlistR{titemsRNRt_HELPTAB_FG_PARAMSRwRSRltfinditerRltstartRvt_HELPTAB_BG_PARAMS( RoR+tnameRbRtCRRctpatterntm((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyR*Ts,   $$ /cGs|j|jddS(NiR(t _view_historyR(RoR((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRHnscGs|j|jddS(NiR(RR(RoR((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRKrscCstdtt|jd|}|js2dS||jkrEdSd|jd<|jjdd|jjd|j|d|jjdd||_|j |j|d|j |j|d|_ |j rg|j j dD]}t j|^q}ng}t||_|j|j|jrM|jn|jt|jdkrd |jdt|jf|jd s1.0RvR?R@RWs s(\\.|[^#])*(#.*)?is%d.%dis[<>{}]s<>(RRyRt tag_removeRlRRRnRlRZtgroupRRvR(RoRptlinenoRRt comment_startRR((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRs0" cCs|jdkrdS|jjdddg|_xt|jdD]\}}tjdd|}|j }|rHyt j |Wqt k r}|jj dd|dd |dqXqHqHWd |jd |rg|j dD]}t j|^q}ng}Wn*tk r}|j|d|_dSXt||_|jjdddtj|_|jrM|jn |j|jsm|jndS(Ns1.0RvisGrammar:Rs R=(RRRRRpRqRRRRRERRRRR}RRyR~RRRRRRRR (RoteventRpRRRmR((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRs6  +       cCs<|dkr)|j|j|jd!}n|jjddd|jjddd|jjdddxt|D]\}}|j|j}|j|}|j|}x*|j |D]}|j ||dqWx%||D]}|j ||dqWx%||D]}|j ||dqWqxWdS(Nistrue-poss1.0Rvs false-negs false-pos( RyRRRURRR RRpRqRr(RoRRRsRwRxRyRz((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyREs cCsKy|jj|SWn0ttfk rF}|jjddd|SXdS(NR=s1.0Rv(R~tparseR}t IndexErrorRRl(RotwordsR((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyR \s cCsf|\}}|jj|d|j||j||ffd|j||j||fdfdS(Ns%s.%si(RURlRoRk(RoRRzRRRv((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRrgs  !cCsdd|_d|_d|_d|_g|_d|_|jjdd|j d|j dS(Nis1.0Rv( RyR~RpRRRRRRRR(Ro((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRms       s# Regexp Chunk Parsing Grammar # Saved %(date)s # # Development set: %(devset)s # Precision: %(precision)s # Recall: %(recall)s # F-score: %(fscore)s %(grammar)s cCs5|s:ddg}tjjd|dd}|s:dSn|jr|j|j|jddkrg|jdd D]}d d |^qx\}}}n.|jdkrd }}}nd }}}t|dT}|j |j t dt j d|jd|d|d|d|jjWdQXdS(Ns Chunk Gramamrs.chunks All filest*t filetypestdefaultextensioniiis%.2f%%idsGrammar not well formedsNot finished evaluation yetRtdateRRRRRp(s Chunk Gramamrs.chunk(s All filesR(Rt filedialogtasksaveasfilenameRRRqR~RytopentwritetSAVE_GRAMMAR_TEMPLATERnRtctimeRRpRn(RotfilenametftypestvRRRtoutfile((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRs&  5cCs|s:d d g}tjjd|dd}|s:dSn|jjdd|jt|d }|j}WdQXtj d d |j }|jj d||jdS(Ns Chunk Gramamrs.chunks All filesRRRs1.0RvRs2^\# Regexp Chunk Parsing Grammar[\s\S]*F-score:.* Rr(s Chunk Gramamrs.chunk(s All filesR( RRtaskopenfilenameRRRRtreadRlRmtlstripRw(RoRRtinfileRp((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRs    c Cs|s:ddg}tjjd|dd}|s:dSnt|dd}|jd|jd tj|jd |jxt|j D]\}\}}}}d |d t |j |d |d |d f} |jd| |jdj d|j j DqW|j oH|j|j|j ddks|jdkrj|jdn |jd|jdj d|jj j DnWdQXdS(NsChunk Gramamr Historys.txts All filesRRRRs'# Regexp Chunk Parsing Grammar History s # Saved %s s# Development set: %s s>Grammar %d/%d (precision=%.2f%%, recall=%.2f%%, fscore=%.2f%%)iids %s Rrcss|]}d|VqdS(s %s N((RiR((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pys siis# Current Grammar (not well-formed) s! Current Grammar (not evaluated) css|]}d|VqdS(s %s N((RiR((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pys s(sChunk Gramamr Historys.txt(s All filesR(RRRRRRRRRRRRRnRRRqR~RyRp( RoRRRRRRRRthdr((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRs0   (0 cGs^dd}d}y-ddlm}|d|d|jWnt|j||nXdS(Ns%NLTK RegExp Chunk Parser Application sWritten by Edward Lopers2About: Regular Expression Chunk Parser Applicationi(tMessagetmessageR(ttkinter.messageboxRtshowR R(RoRtABOUTtTITLER((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRscCsh|dk r|jj|n|jjtt|j|jj|jd|jddS(Nii(RyRRRRRRR(RoRg((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRs  + cCsw|dk r|jj|n|jj}|jjdt| |jjdtdt| dddS(NRgiii( RyRRRRRQtabsRR(RoRg((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRs  cOs$tr dS|jj||dS(s Enter the Tkinter mainloop. This function must be called if this demo is created from a non-interactive program (e.g. from a secript); otherwise, the demo will close as soon as the script completes. N(R Rtmainloop(RoRtkwargs((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyRs (sHelpRHs-Welcome to the regular expression chunk-parser grammar editor. You can use this editor to develop and test chunk parser grammars based on NLTK's RegexpChunkParser class. Use this box ('Help') to learn more about the editor; click on the tabs for help on specific topics: Rules: grammar rule types Regexps: regular expression syntax Tags: part of speech tags Use the upper-left box ('Grammar') to edit your grammar. Each line of your grammar specifies a single 'rule', which performs an action such as creating a chunk or merging two chunks. The lower-left box ('Development Set') runs your grammar on the development set, and displays the results. Your grammar's chunks are highlighted, and the correct (gold standard) chunks are underlined. If they match, they are displayed in green; otherwise, they are displayed in red. The box displays a single sentence from the development set at a time; use the scrollbar or the next/previous buttons view additional sentences. The lower-right box ('Evaluation') tracks the performance of your grammar on the development set. The 'precision' axis indicates how many of your grammar's chunks are correct; and the 'recall' axis indicates how many of the gold standard chunks your system generated. Typically, you should try to design a grammar that scores high on both metrics. The exact precision and recall of the current grammar, as well as their harmonic mean (the 'f-score'), are displayed in the status bar at the bottom of the window.(RIs10s

{...regexp...}

Chunk rule: creates new chunks from words matching regexp.

}...regexp...{

Chink rule: removes words matching regexp from existing chunks.

...regexp1...}{...regexp2...

Split rule: splits chunks that match regexp1 followed by regexp2 in two.

...regexp...{}...regexp...

Merge rule: joins consecutive chunks that match regexp1 and regexp2 (RKs10 60sX

Pattern Matches...

<T> a word with tag T (where T may be a regexp). x? an optional x x+ a sequence of 1 or more x's x* a sequence of 0 or more x's x|y x or y . matches any character (x) Treats x as a group # x... Treats x... (to the end of the line) as a comment \C matches character C (useful when C is a special character like + or #)

Examples:

Matches "cow/NN" Matches "green/NN" Matches "eating/VBG" Matches "ate/VBD"
Matches "on/IN the/DT car/NN" ? Matches "ran/VBD" Matches "slowly/RB ate/VBD" <\#> # This is a comment... Matches "#/# 100/CD" (iN(Dt__name__t __module__t__doc__RzRORnRRSRR R RRRDRLRTR]t _FONT_PARAMSRARRIt_HELPTAB_BG_COLORt_HELPTAB_FG_COLORRRRPRqRyRRRRRRRt _DRAW_LINESRRR RRRRR*RHRKRRRRRWRRpRRRRR RrRRRRRRRRR(((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyR$s  $ !       d  8  g C   <    $     *   1        cCstjdS(N(RR(((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pytappst__main__R('Rt nltk.compattnltkRttextwrapRltrandomttkinter.filedialogRt tkinter.fontRRRRRRRRRR t nltk.treeR t nltk.utilR tnltk.draw.utilR t nltk.corpusR Rt nltk.chunkRRtnltk.chunk.regexpRtobjectRRRt__all__(((sj/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/app/chunkparser_app.pyt s,     F