Closed mromanello closed 6 years ago
@mromanello I'm afraid we have no tutorial code on it. The use-case we had was reading in an existing XMI+typesystem, make modifications to it and write it out again. If the test cases do not include an example where a CAS is created from scratch, then it might even not be possible - I do knot know.
no, no, my use case is simply to create a CAS starting from a file in another format and already existing XMI+typesystem
Having had a quick look at the CasFactory, it seems that the case to create a CAS from scratch (i.e. using a type system but without a pre-existing XMI file) is currently not considered:
But maybe (?) it could easily be implemented by adding another construction method which simply skips these two lines?
ok, before I start getting my hands dirty with the code, a couple of questions:
actually, this test seems to cover the creation of a CAS from scratch (but without using the CASFactory
):
Indeed :)
No idea.
I guess the commands to run the test are as documented here?: https://docs.python.org/2/library/unittest.html
So something like this might work:
python -m unittest TestCasReader
thanks. anyway I think I've figured it out, see the PR ;) hope it can be accepted.
Hi,
What would be the best place for me to learn how to use the pyCAS library?
I had a look at the tests, but I was wondering if you have any somehow more descriptive code (e.g. notebook) about the creation of a CAS-XMI file?
Many thanks in advance