CwmTips

From W3C Wiki

Tips for living with cwm, a SemanticWeb tool written in PythonLanguage.

The cwm docs direct problem reports to public-cwmbugs@w3.org. see archive

Tutorials, Examples

(hmm... CwmProjects? CwmUsage? CwmExamples?)

Troubleshooting

./test gives an error

  • maybe an old version of Expat? (that was the case Apr 05 2003)

confusion under Cygwin

  • Renaming LX/URI.py to LX/uri.py fixed some confusion under Cygwin. Do this for Mac OS X, too. (sethl 2003/06/19) what are the symptoms here?

I18N problems

Mar 26 fiddling

Q.v. chat on #rdfig on 2004-03-26 'twixt DanC, ndw, et al..

Goal: to establish the value of a property based on it not already having some other value in a particular file.

in essays.n3:


@prefix log:  <http://www.w3.org/2000/10/swap/log#> .

@prefix : <#>.
@prefix t: <http://example/dunno@@#>.
 
this log:forAll :ESSAY. 
 
{ <topics.n3> log:semantics ?TOPIC_KB. 
  ?TOPIC_KB log:includes { :ESSAY a t:Article }. 
  ?TOPIC_KB log:notIncludes { :ESSAY t:talkback "no" }. 
 } => { :ESSAY t:talkback "yes" } . 


in topics.n3:


@prefix t: <http://example/dunno@@#>.

@prefix : <#>.

:e1 a t:Article.
:e2 a t:Article; t:talkback "no".


and run ala:


$ python cwm.py essay.n3 --think --data


and out comes


     @prefix : <topics.n3#> .
     @prefix t: <http://example/dunno@@#> .
     
    :e1     t:talkback "yes" .


Wish list

  • It would be good to have a Debian package, as with RubyRDF.
 Some relevant python documentation (on making a setup.py).
 Also see Installing Python Modules. Also file
 copying code from this  snippet of python
 that i found, perhaps useful?
 DanBri has checked in his work so far (Mar 2* 2003), swap/packages/debian/.
 It now builds a .deb, which puts us at the 'figuring out where stuff should live' stage of things, and
 working out how Python's distutils, ie setup.py machinery, works in the Debian world.
 See chat with Eikeon, pointer to rdflib's setup.py etc., setup.py details

Add-ons

Random features?

In test directory,

$ ./n3-xml-test.sh `cat tests-work.txt `

...does something interesting. Converts each of several N3 files into RDF, and then back into N3, and compare results.

tests-notworking.txt does similar for tests that don't work.

This isn't hooked up to Makefile test framework yet.

There is a flag [-s 10 to start on 10th test -timbl] for retest.py that allows you to skip past broken tests (since 'make all' in test will barf on first failed test).

CWM - How to develop modules - Missing Manual from karl on 2003-10-14 (www-archive@w3.org from October 2003)

Not in RDF - Norm Walsh Apr 2004