<commit_before># OpenCalais Web

This is a small web service to experiment with fetching semantic metadata using [OpenCalais](http://www.opencalais.com/).

## How To Run

First, you need to get an API key from the [OpenCalais web site](http://www.opencalais.com/APIkey).

You can run service locally with `foreman`, just add `.env` file like that:

```{sh}
OPEN_CALAIS_API_KEY=your_open_calais_api_key
PORT=9292 # or whatever port you like to run service on
AUTH_TOKEN=some_string # token is used to check access for the service
```

And then just run `foreman start`.

Or you can deploy service to Heroku.

```{sh}
heroku create
git push heroku master
heroku config:set OPEN_CALAIS_API_KEY=your_open_calais_api_key
heroku config:set AUTH_TOKEN=some_string
```

# How It Works<commit_msg>annd note about goose to readme<commit_after># OpenCalais Web

This is a small web service to experiment with fetching semantic metadata using [OpenCalais](http://www.opencalais.com/).

> **NOTE** This is same as [https://github.com/antlypls/open_calais_web](https://github.com/antlypls/open_calais_web). But it uses jruby and [goose](https://github.com/GravityLabs/goose) to fetch page content.

## How To Run

First, you need to get an API key from the [OpenCalais web site](http://www.opencalais.com/APIkey).

You can run service locally with `foreman`, just add `.env` file like that:

```{sh}
OPEN_CALAIS_API_KEY=your_open_calais_api_key
PORT=9292 # or whatever port you like to run service on
AUTH_TOKEN=some_string # token is used to check access for the service
```

And then just run `foreman start`.

Or you can deploy service to Heroku.

```{sh}
heroku create
git push heroku master
heroku config:set OPEN_CALAIS_API_KEY=your_open_calais_api_key
heroku config:set AUTH_TOKEN=some_string
```

# How It Works
{'fraction_non_alphanumeric': 0.09141274238227147, 'fraction_numerical': 0.00443213296398892, 'mean_word_length': 5.163822525597269, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 3, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5336397', 'n_tokens_mistral': 611, 'n_tokens_neox': 591, 'n_words': 214}