public:t-malv-15-3:7
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| public:t-malv-15-3:7 [2015/10/01 07:33] – [1.3 Get a feel for NP chunking] orvark | public: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:// | ||
| ===== 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) | + | |
| </ | </ | ||
| Line 89: | Line 90: | ||
| </ | </ | ||
| - | ==== 2.1 Improve the RE Chunker ==== | + | ==== 2.1 Improve the Regexp |
| - | **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 |
| <code python> | <code python> | ||
| Line 101: | Line 102: | ||
| </ | </ | ||
| - | **Note the special RE Syntax for Chunk Rules:** | + | Note the special RE Syntax for Chunk Rules: |
| < | < | ||
| - | Examples: | + | Example: Matches: |
| | | ||
| Line 115: | Line 116: | ||
| - | **NOTE: You should be able to get the IOB Accuracy above 66%. Report you results.** | + | **NOTE: You should |
/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)