User Tools

Site Tools


public:t-malv-15-3:7

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:t-malv-15-3:7 [2015/10/01 07:33] – [1.3 Get a feel for NP chunking] orvarkpublic:t-malv-15-3:7 [2024/04/29 13:33] (current) – external edit 127.0.0.1
Line 6: Line 6:
  
 **Answer questions or report results in comments in your code.** **Answer questions or report results in comments in your code.**
 +
 +[[http://www.nltk.org/book/ch07.html#chunking|Section 2 in chapter 7 contains information on Chunking]].
  
 ===== 1. Training a tagger to Chunk NPs ===== ===== 1. Training a tagger to Chunk NPs =====
Line 79: Line 81:
 re_chunker = nltk.RegexpParser(pattern) # create a re chunk parser re_chunker = nltk.RegexpParser(pattern) # create a re chunk parser
  
-result = re_chunker.parse(sentence) +print(re_chunker.parse(sentence))
-print(result)+
 </code> </code>
  
Line 89: Line 90:
 </code> </code>
  
-==== 2.1 Improve the RE Chunker ====+==== 2.1 Improve the Regexp Chunker ====
  
-**TODO: Improve upon the re patterns. You could use the tag patterns you discovered in 1.3 to guide you.**+**TODO: Improve upon the Regular Expressions NP chunking patterns.** You could use the tag patterns you discovered in 1.3 to guide you. [[http://www.nltk.org/book/ch07.html#chunking|Section 2 in chapter 7]] also contains some relevant examples.
  
 <code python> <code python>
Line 101: Line 102:
 </code> </code>
  
-**Note the special RE Syntax for Chunk Rules:**+Note the special RE Syntax for Chunk Rules:
 <code> <code>
- Examples    Matches:+ Example     Matches:
  
  {<A>        #Tag A  {<A>        #Tag A
Line 115: Line 116:
  
  
-**NOTE: You should be able to get the IOB Accuracy above 66%. Report you results.**+**NOTE: You should at least be able to get the IOB Accuracy for ''test_sents'' above 66%. Report you results.**
/var/www/cadia.ru.is/wiki/data/attic/public/t-malv-15-3/7.1443684824.txt.gz · Last modified: 2024/04/29 13:32 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki