User Tools

Site Tools


public:t-malv-15-3:8

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:8 [2015/10/08 07:57] – [3. Interactive python script] orvarkpublic:t-malv-15-3:8 [2024/04/29 13:33] (current) – external edit 127.0.0.1
Line 90: Line 90:
 </code> </code>
  
-**Note** that ''tree.label()['SEM']'' returns an object of type ''nltk.sem.logic.ApplicationExpression'' (as can be seen by checking its type with ''type()'') and not a string even though you can print it out. To use it in ''evaluate()'' it has to be turned into a string. The simplest way to do that is to use the expression ''"%s" % semantic_representation'' which returns a string.+**Note** that ''tree.label()['SEM']'' returns an object of type ''nltk.sem.logic.ApplicationExpression'' (as can be seen by checking its type with ''type()'') and not a string even though you can print it out. To use it in ''evaluate()'' it has to be turned into a string. The simplest way to do that is to use ''str(semantic_expression)'' or the format operator ''"%s" % semantic_representation'' which return a string.
/var/www/cadia.ru.is/wiki/data/attic/public/t-malv-15-3/8.1444291066.txt.gz · Last modified: 2024/04/29 13:32 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki