Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #55219

Re: extraction tool using CRF++

Path csiph.com!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <j.j.molenaar@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.034
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'python,': 0.02; 'semantic': 0.09; 'sentence': 0.09; 'subject:using': 0.09; 'url:googlecode': 0.09; 'wrapper': 0.09; 'python': 0.11; 'ctypes.': 0.16; 'subdirectory': 0.16; 'url:html)': 0.16; 'url:svn': 0.16; 'wrote:': 0.18; 'module': 0.19; 'written': 0.21; 'import': 0.22; 'library,': 0.24; 'source': 0.25; 'compiled': 0.26; 'url:edu': 0.26; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'character': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; '>>>>': 0.31; 'extract': 0.31; 'file': 0.32; 'probably': 0.32; 'interface': 0.32; 'another': 0.32; 'url:python': 0.33; 'tool': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'accessing': 0.36; 'described': 0.36; 'false': 0.36; 'module.': 0.36; 'url:listinfo': 0.36; 'possible': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'ahead': 0.38; 'e.g.': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'url:01': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'how': 0.40; 'skip:u 10': 0.60; 'skip:n 30': 0.60; 'course': 0.61; 'url:index': 0.63; 'due': 0.66; 'food': 0.72; 'bread': 0.84; 'subject:tool': 0.84; 'url:03': 0.84; '"how': 0.91; 'ore': 0.91; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=q0cVO2JHktvoqNPE/LaxcFTroEnstbo8NOrDdA/PCQU=; b=U+8qwS/lzUlh5LOKmt/CJV2jJIxEnjr89QVk+ieZbgLid6wUdgU5M/2Qy/wtCPCTla F6h81f1QY3AQerEyh7PWkXrpIRrazU8Uqd43sWGY20oLklQ1oat5RYMe+5/K2wUN9nE2 TXatGAM92kBfZe+QPTGweEmGX6wkeNBhHC3aMBDq4JhCO3nhY45gfDJYtm5DVLQ0jbLO Bof0U1oidFkzPNNnUVE7mwVb71Q/TRX5Igd7OoJkIKCzHoaY19aS4E7FgvmD3N3s7HoC VGZAWnhNebcGQkG1QWR45ltatjV1CKBXn1zeB6bfGtjmSVhMqE3R3OCpvRTcIV7iF/ol dkQQ==
MIME-Version 1.0
X-Received by 10.194.174.36 with SMTP id bp4mr22496314wjc.7.1380639840770; Tue, 01 Oct 2013 08:04:00 -0700 (PDT)
In-Reply-To <CAHzaPEMnb0iAbp_V9EK7BkR_mk1Kj1RCnYrj0ztZ-uR5XA-bsQ@mail.gmail.com>
References <90b8ca83-fb81-40d6-a864-f1c0e07bca76@googlegroups.com> <CAHzaPEMnb0iAbp_V9EK7BkR_mk1Kj1RCnYrj0ztZ-uR5XA-bsQ@mail.gmail.com>
Date Tue, 1 Oct 2013 17:04:00 +0200
Subject Re: extraction tool using CRF++
From Joost Molenaar <j.j.molenaar@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.562.1380639848.18130.python-list@python.org> (permalink)
Lines 79
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1380639849 news.xs4all.nl 15914 [2001:888:2000:d::a6]:47461
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:55219

Show key headers only | View raw


Hi Ron,
In the python/ subdirectory of the CRF++ source package there's a
README with instructions on how to use the CRFPP python module.

HTH,

Joost

On Tue, Oct 1, 2013 at 4:24 PM, Vlastimil Brom <vlastimil.brom@gmail.com> wrote:
> 2013/10/1 cerr <ron.eggler@gmail.com>:
>> Hi,
>>
>> I want to write an extraction tool using CRF++ (http://crfpp.googlecode.com/svn/trunk/doc/index.html).
>> I have written a trainings file and a template:
>> training:
>> banana  FOOD    B-NP
>> bread   FOOD    I-NP
>> template:
>> U01:%x[0,1]
>> U02:%x[1,1]
>>
>> and now I want to go ahead and extract the foods from a sentence like "how do I make a banana bread". Also, I'm unsure how I interface to crf++ with python, I compiled and installed it from source as described on the above website but I don't have a crf module available in python...
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>
>
> Hi,
> I have unfortunately no experience with CRF++; if there is no python
> wrapper for it available, the usage might not be (easily) possible -
> depending on the character of this library, you may try accessing it
> e.g. via ctypes.
>
> Alternatively, you may try another packages already available, e.g.
> NLTK:  http://nltk.org/
>
>>>> import nltk
>>>> any(synset.lexname == "noun.food" for synset in nltk.corpus.wordnet.synsets("apple"))
> True
>>>> any(synset.lexname == "noun.food" for synset in nltk.corpus.wordnet.synsets("bread"))
> True
>>>> any(synset.lexname == "noun.food" for synset in nltk.corpus.wordnet.synsets("wine"))
> True
>>>> any(synset.lexname == "noun.food" for synset in nltk.corpus.wordnet.synsets("book"))
> False
>>>> any(synset.lexname == "noun.food" for synset in nltk.corpus.wordnet.synsets("pencil"))
> False
>
> # of course there might be some surprise, probably due to polysemy ore
> some specifics of the semantic description...
>
>>>> any(synset.lexname == "noun.food" for synset in nltk.corpus.wordnet.synsets("dog"))
> True
>>>> any(synset.lexname == "noun.food" for synset in nltk.corpus.wordnet.synsets("white"))
> True
>>>>
>
> cf.
> http://nltk.org/
> http://nltk.googlecode.com/svn/trunk/doc/howto/wordnet.html
> http://www.velvetcache.org/2010/03/01/looking-up-words-in-a-dictionary-using-python
> http://wordnet.princeton.edu/man/lexnames.5WN.html
>
> hth,
>    vbr
> --
> https://mail.python.org/mailman/listinfo/python-list

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

extraction tool using CRF++ cerr <ron.eggler@gmail.com> - 2013-09-30 21:14 -0700
  Re: extraction tool using CRF++ Vlastimil Brom <vlastimil.brom@gmail.com> - 2013-10-01 16:24 +0200
  Re: extraction tool using CRF++ Joost Molenaar <j.j.molenaar@gmail.com> - 2013-10-01 17:04 +0200
    Re: extraction tool using CRF++ cerr <ron.eggler@gmail.com> - 2013-10-01 08:36 -0700

csiph-web