Skip to content

Commit

Permalink
Continued updating docs to reflect new names
Browse files Browse the repository at this point in the history
  • Loading branch information
James Arana committed Feb 27, 2011
1 parent af54c9d commit 22a0532
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/recipes/rephrase.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ In this recipe, we'll use ConceptNet's natural language tools (and basically
nothing else) to rephrase a sentence into various forms.

Load the English natural language tools, an instance of
:class:`csc.nl.NLTools` that you can get using :meth:`get_nl`.
:class:`simplenlp.NLTools` that you can get using :meth:`get_nl`.

>>> from csc.nl import get_nl
>>> from simplenlp import get_nl
>>> en_nl = get_nl('en')

We're going to do everything using the :meth:`lemma_split` and
Expand All @@ -25,15 +25,15 @@ residues are different.

Using :meth:`lemma_combine`, we can put these back together:

>>> en.nl.lemma_combine(u'sit couch', u'you are 1ing on a 2')
>>> en_nl.lemma_combine(u'sit couch', u'you are 1ing on a 2')
u'you are sitting on a couch'

By changing the residue while leaving the normalized form the same, we can
rephrase text.

>>> en.nl.lemma_combine(u'sit couch', u'1 on the 2')
>>> en_nl.lemma_combine(u'sit couch', u'1 on the 2')
u'sit on the couch'

>>> en.nl.lemma_combine(u'sit couch', u'a 2 is something for 1ing on')
>>> en_nl.lemma_combine(u'sit couch', u'a 2 is something for 1ing on')
u'a couch is something for sitting on'

0 comments on commit 22a0532

Please sign in to comment.