<commit_before>
node-openrefine
===============

Node.js client library for controlling OpenRefine.

Features
--------

* [x] upload, apply operations, download results
* [ ] import from and export to buffer
* [ ] pipe
* [ ] CLI tool

Usage
-----

```
import {OpenRefine} from 'openrefine'

var server = OpenRefine()
// set API endpoint
//var server = OpenRefine('http://localhost:3333')

server.projects_metadata()
  .then(data => ...)

server.project('my_awesome_data_cleanup_project')
  .upload('upload.csv')
  .apply('operations.json')
  .download('csv', 'output.csv')
  .then(r => {
    server.delete(r.project_id)
    done()
  })

// load existing project by numeric project id
server.project()
  .id(project_id)
  .download('csv', 'output.csv')
  .then(done)
```

Project metadata format :

```
{
  "projects": {
    "[project_id]": {
      "name": "[project_name]",
      "created": "[project_creation_time]",
      "modified": "[project_modification_time]",
      "customMetadata": {}
    },
    ...[More projects]...
  }
}
```
<commit_msg>fix document<commit_after>
node-openrefine
===============

Node.js client library for controlling OpenRefine.

Features
--------

* [x] upload, apply operations, download results
* [ ] import from and export to buffer
* [ ] pipe
* [ ] CLI tool

Usage
-----

```
var OpenRefine = require('openrefine').OpenRefine

var server = OpenRefine()
// set API endpoint
//var server = OpenRefine('http://localhost:3333')

server.projects_metadata()
  .then(data => ...)

server.project('my_awesome_data_cleanup_project')
  .upload('upload.csv')
  .apply('operations.json')
  .download('csv', 'output.csv')
  .then(r => {
    server.delete(r.project_id)
    done()
  })

// load existing project by numeric project id
server.project()
  .id(project_id)
  .download('csv', 'output.csv')
  .then(done)
```

Project metadata format :

```
{
  "projects": {
    "[project_id]": {
      "name": "[project_name]",
      "created": "[project_creation_time]",
      "modified": "[project_modification_time]",
      "customMetadata": {}
    },
    ...[More projects]...
  }
}
```

{'fraction_non_alphanumeric': 0.1934566145092461, 'fraction_numerical': 0.003793266951161688, 'mean_word_length': 3.460887949260042, 'pattern_counts': {'":': 12, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2572328', 'n_tokens_mistral': 708, 'n_tokens_neox': 683, 'n_words': 148}