<commit_before># lita-google-ranking

[![Build Status](https://travis-ci.org/marsz/lita-google-ranking.png?branch=master)](https://travis-ci.org/marsz/lita-google-ranking)

Lita (robot) handler for querying RubyGems.org through official API gem (https://github.com/rubygems/gems).

## Installation

Add lita-google-ranking to your Lita instance's Gemfile:

``` ruby
gem "lita-google-ranking"
```

## Configuration

in `lita_config.rb`

```
config.google_ranking.gl = "tw"
config.google_ranking.lr = "lang_zh"
config.google_ranking.cr = "countryTW"
```

- `gl` : http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
- `lr` : https://developers.google.com/custom-search/docs/xml_results?hl=en&csw=1#languageCollections
- `cr` : https://developers.google.com/custom-search/docs/xml_results?hl=en&csw=1#countryCollections

## Usage

`lita gr DOMAIN KEYWORD` : send KEYWORD to google web search, and return rank of DOMAIN from search results

```
"KEYWORD" ranking of DOMAIN is 3
```

## License

[MIT](http://opensource.org/licenses/MIT)
<commit_msg>refine readme<commit_after># lita-google-ranking

[![Build Status](https://travis-ci.org/marsz/lita-google-ranking.png?branch=master)](https://travis-ci.org/marsz/lita-google-ranking)

Lita (robot) handler for getting rank of DOMAIN on google web search with a KEYWORD.

## Installation

Add lita-google-ranking to your Lita instance's Gemfile:

``` ruby
gem "lita-google-ranking"
```

## Configuration

in `lita_config.rb`

```
config.google_ranking.gl = "tw"
config.google_ranking.lr = "lang_zh"
config.google_ranking.cr = "countryTW"
```

- `gl` : http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes
- `lr` : https://developers.google.com/custom-search/docs/xml_results?hl=en&csw=1#languageCollections
- `cr` : https://developers.google.com/custom-search/docs/xml_results?hl=en&csw=1#countryCollections

## Usage

`lita gr DOMAIN KEYWORD` : send KEYWORD to google web search, and return rank of DOMAIN from search results

```
"KEYWORD" ranking of DOMAIN is 3
```

## License

[MIT](http://opensource.org/licenses/MIT)

{'fraction_non_alphanumeric': 0.15499758570738773, 'fraction_numerical': 0.00772573635924674, 'mean_word_length': 5.094117647058823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '6140811', 'n_tokens_mistral': 777, 'n_tokens_neox': 735, 'n_words': 141}