<commit_before># Linguist v2

Linguist allows you to talk to people around the world in different languages by translating your messages automatically for you.

## Table of Contents

1. [Usage](#Usage)
1. [Requirements](#requirements)
1. [Development](#development)
    1. [Installing Dependencies](#installing-dependencies)
    1. [Tasks](#tasks)
1. [Deployment](#deployment)
1. [Team](#team)
1. [Contributing](#contributing)

## Usage

> You can try **Linguist v2** here: [**Linguist v2**](http://linguistv2.azurewebsites.net).

1. Select your language from the sidebar
1. Create a username
1. Select the room you want to chat in. If no room is selected, default is lobby
1. Start chatting!

## Requirements

- Node 0.10.x
- MongoDB
- Microsoft Translator

## Development

### Installing Dependencies

1. Run npm and bower install

From within the root directory:

```sh
npm install -g bower
npm install
bower install
```

2. Acquire Microsoft Translator credentials (Client ID and Client secret) through Windows Azure. Guide available [here](http://blogs.msdn.com/b/translation/p/gettingstarted1.aspx).

3. Add the MongoLabs addon to your Azure account by signing up for a free "Sandbox" account [here](http://azure.microsoft.com/en-us/marketplace/partners/mongolab/mongolab/)

4. Once your MongoLabs addon has been created, click 'connection info' from your Azure portal &mdash; copy the MongoLab URI for the 'remoteProdDb' below.

5. Create a config.js file in /server/ with the following contents:

```sh
var config = {
  client_id: "FILL_ME_IN",
  client_secret: "FILL_ME_IN",
  localDevDb: 'mongodb://localhost:27017/linguist',
  remoteProdDb: 'FILL_ME_IN',
  apiAdminSecret: 'FILL_ME_IN', // make up a random string
  productionUrl: 'FILL_ME_IN', // should match your deployed app
  devUrl: 'http://localhost:3000/'
};
module.exports = config;
```

### Tasks

1. `gulp` - Runs tests, builds public scripts, and serves site on local server port 3000, and watches for changes to files (server and public).
1. `gulp scripts` - Builds public scripts for deployment, placing result in /public/dist
1. `gulp test-server` - Runs server tests
1. `gulp test-client` - Runs client tests
1. `gulp seed:emojis` - Seeds database with emojis from GitHub's API, and seed `img/emojis/` with PNG emoji files

## Deployment

***(credit <NAME>, [Hack Reactor](http://hackreactor.com))***

1. Install Azure-CLI: `npm install -g azure-cli`
1. Connect to your Azure account<commit_msg>Add clarification about seed:emojis gulp task in README<commit_after># Linguist v2

Linguist allows you to talk to people around the world in different languages by translating your messages automatically for you.

## Table of Contents

1. [Usage](#Usage)
1. [Requirements](#requirements)
1. [Development](#development)
    1. [Installing Dependencies](#installing-dependencies)
    1. [Tasks](#tasks)
1. [Deployment](#deployment)
1. [Team](#team)
1. [Contributing](#contributing)

## Usage

> You can try **Linguist v2** here: [**Linguist v2**](http://linguistv2.azurewebsites.net).

1. Select your language from the sidebar
1. Create a username
1. Select the room you want to chat in. If no room is selected, default is lobby
1. Start chatting!

## Requirements

- Node 0.10.x
- MongoDB
- Microsoft Translator

## Development

### Installing Dependencies

1. Run npm and bower install

From within the root directory:

```sh
npm install -g bower
npm install
bower install
```

2. Acquire Microsoft Translator credentials (Client ID and Client secret) through Windows Azure. Guide available [here](http://blogs.msdn.com/b/translation/p/gettingstarted1.aspx).

3. Add the MongoLabs addon to your Azure account by signing up for a free "Sandbox" account [here](http://azure.microsoft.com/en-us/marketplace/partners/mongolab/mongolab/)

4. Once your MongoLabs addon has been created, click 'connection info' from your Azure portal &mdash; copy the MongoLab URI for the 'remoteProdDb' below.

5. Create a config.js file in /server/ with the following contents:

```sh
var config = {
  client_id: "FILL_ME_IN",
  client_secret: "FILL_ME_IN",
  localDevDb: 'mongodb://localhost:27017/linguist',
  remoteProdDb: 'FILL_ME_IN',
  apiAdminSecret: 'FILL_ME_IN', // make up a random string
  productionUrl: 'FILL_ME_IN', // should match your deployed app
  devUrl: 'http://localhost:3000/'
};
module.exports = config;
```

### Tasks

1. `gulp` - Runs tests, builds public scripts, and serves site on local server port 3000, and watches for changes to files (server and public).
1. `gulp scripts` - Builds public scripts for deployment, placing result in /public/dist
1. `gulp test-server` - Runs server tests
1. `gulp test-client` - Runs client tests
1. `gulp seed:emojis` - Seeds database with emojis from GitHub's API, and seed `img/emojis/` with PNG emoji files
    - **Note**: the server *must* be running when you try to seed the database &mdash; spin up another shell and run `gulp` before running `gulp seed:emojis` in your other shell thread.

## Deployment

***(credit <NAME>, [Hack Reactor](http://hackreactor.com))***

1. Install Azure-CLI: `npm install -g azure-cli`
1. Connect to your Azure account
{'fraction_non_alphanumeric': 0.11233565351894818, 'fraction_numerical': 0.01740139211136891, 'mean_word_length': 4.4167539267015705, 'pattern_counts': {'":': 0, '<': 5, '<?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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2382631', 'n_tokens_mistral': 1730, 'n_tokens_neox': 1608, 'n_words': 624}