<commit_before># Vokativ JS

[![Build Status](https://travis-ci.org/vuk/vokativ-js.svg?branch=master)](https://travis-ci.org/vuk/vokativ-js)


## Acknowledgements

This is a NodeJS port of PHP Vocative case library for Serbian language written by [<NAME>](https://github.com/avramovic). 

Original idea and PHP implementation can be found at [Vokativ](https://github.com/avramovic/Vokativ). 

## Installation 

`npm install vokativ-js`

Optionally you can add `--save` flag to update `package.json` dependency list

## Usage 

### Using vokativ-js with promises (from [Q library](https://github.com/kriskowal/q))

```javascript

var vocative = require('vokativ-js');

vocative.promised('Vuk')
    .then(function(value){
    	console.log("Zdravo " + value); // Will reply with "Z<NAME>če"
    });

```

### Using vokativ-js with callbacks 

```javascript

var vocative = require('vokativ-js');

vocative.async('Вук', function(err, value){
	if(!err){
		console.log("Здраво " + value); // Will reply with "Здраво Вуче" - so cyrillic script works as well
	}
});

```

### Note: 

Due to significant similarity, this library should also work just fine with Croatian, Bosnian, Montenegrin languages, but if there are any rules that algorithm may have missed feel free to contact me or make a pull request. <commit_msg>README.md edits<commit_after># Vokativ JS

[![Build Status](https://travis-ci.org/vuk/vokativ-js.svg?branch=master)](https://travis-ci.org/vuk/vokativ-js)


## Acknowledgements

This is a NodeJS port of PHP Vocative case library for Serbian language written by [<NAME>ramovic](https://github.com/avramovic). 

Original idea and PHP implementation can be found at [Vokativ](https://github.com/avramovic/Vokativ). 

## Installation 

`npm install vokativ-js`

Optionally you can add `--save` flag to update `package.json` dependency list

## Usage 

### Using vokativ-js with promises (from [Q library](https://github.com/kriskowal/q))

```javascript

var vocative = require('vokativ-js');

vocative.promised('Vuk')
    .then(function(value){
    	console.log("Zdravo " + value); // Will reply with "Zdravo Vuče"
    });

```

### Using vokativ-js with callbacks 

```javascript

var vocative = require('vokativ-js');

vocative.async('Вук', function(err, value){
	if(!err){
		console.log("Здраво " + value); // Will reply with "Здраво Вуче" - so cyrillic script works as well
	}
});

```

### Note: 

Due to significant similarity, this library should also work just fine with former Yuboslav languages such as Croatian, Bosnian, Montenegrin, but if there are any rules that algorithm may have missed feel free to contact me or make a pull request. 
{'fraction_non_alphanumeric': 0.13576532531026703, 'fraction_numerical': 0.0, 'mean_word_length': 4.362903225806452, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, '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': '6996018', 'n_tokens_mistral': 919, 'n_tokens_neox': 870, 'n_words': 266}