You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the official Python SDK for [*refinery*](https://github.com/code-kern-ai/refinery), your**open-source** data-centric IDE for NLP.
6
+
This is the official Python SDK for [*refinery*](https://github.com/code-kern-ai/refinery), the**open-source** data-centric IDE for NLP.
7
7
8
8
**Table of Contents**
9
9
-[Installation](#installation)
@@ -22,15 +22,15 @@ This is the official Python SDK for [*refinery*](https://github.com/code-kern-ai
22
22
23
23
## Installation
24
24
25
-
You can set up this SDK either via running `$ pip install kern-sdk`, or by cloning this repository and running `$ pip install -r requirements.txt`.
25
+
You can set up this SDK either via running `$ pip install refinery-python`, or by cloning this repository and running `$ pip install -r requirements.txt`.
26
26
27
27
## Usage
28
28
29
29
### Creating a `Client` object
30
30
Once you installed the package, you can create a `Client` object from any Python terminal as follows:
31
31
32
32
```python
33
-
fromkernimport Client
33
+
fromrefineryimport Client
34
34
35
35
user_name ="your-username"# this is the email you log in with
Alternatively, you can also just run `kern pull` in your CLI given that you have provided the `secrets.json` file in the same directory.
72
+
Alternatively, you can also just run `refinery pull` in your CLI given that you have provided the `secrets.json` file in the same directory.
73
73
74
74
The `df` contains both your originally uploaded data (e.g. `headline` and `running_id` if you uploaded records like `{"headline": "some text", "running_id": 1234}`), and a triplet for each labeling task you create. This triplet consists of the manual labels, the weakly supervised labels, and their confidence. For extraction tasks, this data is on token-level.
We use Pandas to process the data you upload, so you can also provide `import_file_options` for the file type you use. Currently, you need to provide them as a `\n`-separated string (e.g. `"quoting=1\nsep=';'"`). We'll adapt this in the future to work with dictionaries instead.
115
115
116
-
Alternatively, you can `kern push <path-to-your-file>` via CLI, given that you have provided the `secrets.json` file in the same directory.
116
+
Alternatively, you can `refinery push <path-to-your-file>` via CLI, given that you have provided the `secrets.json` file in the same directory.
117
117
118
118
**Make sure that you've selected the correct project beforehand, and fit the data schema of existing records in your project!**
119
119
@@ -125,7 +125,7 @@ Alternatively, you can `kern push <path-to-your-file>` via CLI, given that you h
125
125
To do so, do the following:
126
126
127
127
```python
128
-
fromkern.adapter import rasa
128
+
fromrefinery.adapter import rasa
129
129
130
130
rasa.build_intent_yaml(
131
131
client,
@@ -148,7 +148,7 @@ nlu:
148
148
If you want to provide a metadata-level label (such as sentiment), you can provide the optional argument `metadata_label_task`:
149
149
150
150
```python
151
-
from kern.adapter import rasa
151
+
from refinery.adapter import rasa
152
152
153
153
rasa.build_intent_yaml(
154
154
client,
@@ -173,7 +173,7 @@ nlu:
173
173
And if you have entities in your texts which you'd like to recognize, simply add the `tokenized_label_task` argument:
174
174
175
175
```python
176
-
from kern.adapter import rasa
176
+
from refinery.adapter import rasa
177
177
178
178
rasa.build_intent_yaml(
179
179
client,
@@ -215,7 +215,7 @@ Let us know what open-source/closed-source NLP framework you are using, for whic
215
215
- [x] Fetch project statistics
216
216
217
217
218
-
If you want to have something added, feel free to open an [issue](https://github.com/code-kern-ai/kern-python/issues).
218
+
If you want to have something added, feel free to open an [issue](https://github.com/code-kern-ai/refinery-python/issues).
219
219
220
220
## Contributing
221
221
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
0 commit comments