marc-j / camomile-client-python Goto Github PK
View Code? Open in Web Editor NEWThis project forked from camomile-project/camomile-client-python
Python client for Camomile REST API
License: MIT License
This project forked from camomile-project/camomile-client-python
Python client for Camomile REST API
License: MIT License
It seems that both getCorpusMetadata
and getCorpusMetadataKeys
returns the same thing in the following test:
metadata = {'key1': 'value1', 'key2': 'value2'}
client.setCorpusMetadata(corpus, metadata)
client.getCorpusMetadata(corpus) # returns ['key1', 'key2']
client.getCorpusMetadataKeys(corpus) # returns ['key1', 'key2']
Can you clarify the difference between those two approaches?
Creating a metadata of type "file" seems to work fine:
import tempfile
_, localPathToFile = tempfile.mkstemp()
with open(localPathToFile, 'w') as fp:
fp.write('blah blah blah')
client.sendCorpusMetadataFile(corpus, 'key.subkey', localPathToFile)
However, how can I access the content of the file, now ?
The following line raises a ValueError: No JSON object could be decoded
client.getCorpusMetadata(corpus, 'key.subkey')
Create a new corpus (with no metadata)
>>> corpus = client.createCorpus('corpus', returns_id=True)
Expected result:
>>> client.getCorpusMetadata(corpus)
[]
Instead, we get `HTTPError: 'unicode' object has no attribute 'get'``
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.