<commit_before># WineOCR

OCR-based tool, used to feed [OpenWines](http://openwines.eu) open-data, using wine bottle labels images:

<img src="https://raw.githubusercontent.com/OpenWines/OpenWinesOCR/master/examples/etiquette_3.jpg"
     height="50%" width="50%">

## Output:

```
$ node wineocr.js etiquette_3.jpg                                                        11:40  ronan@cider

CHÂTEAU MERCIER

CÔTES DE BOURG

APPELLATION CÔTES DE BOURG CONTRÔLÉE

2000

15H ml
ÇERÊRÏﬁLL MIS EN BOUTEILLE AU CHATEAU

“l |
S.C.E.A. FAMILLE CHETY, PRODUCTEUR A SA|NT—TROJAN (GIRONDE) FRANCE  .
```

The OCR output is both displayed in the console and written in a newly created `[IMAGE_PATH].ocr.txt` file

## Usage:

```
$ node wineocr.js [path] [layout_analysis_option] [language_code]
```
<commit_msg>notes about dependencies (asked via email)<commit_after># WineOCR

OCR-based tool, used to feed [OpenWines](http://openwines.eu) open-data, using wine bottle labels images:

<img src="https://raw.githubusercontent.com/OpenWines/OpenWinesOCR/master/examples/etiquette_3.jpg"
     height="50%" width="50%">

## Dependencies

These scripts use [nodejs](https://nodejs.org/), dependencies are managed via [npm](https://www.npmjs.com/)

```
$ npm install
```

## Output:

```
$ node wineocr.js etiquette_3.jpg

CHÂTEAU MERCIER

CÔTES DE BOURG

APPELLATION CÔTES DE BOURG CONTRÔLÉE

2000

15H ml
ÇERÊRÏﬁLL MIS EN BOUTEILLE AU CHATEAU

“l |
S.C.E.A. FAMILLE CHETY, PRODUCTEUR A SA|NT—TROJAN (GIRONDE) FRANCE  .
```

The OCR output is both displayed in the console and written in a newly created `[IMAGE_PATH].ocr.txt` file

## Usage:

```
$ node wineocr.js [path] [layout_analysis_option] [language_code]
```

{'fraction_non_alphanumeric': 0.12294117647058823, 'fraction_numerical': 0.01647058823529412, 'mean_word_length': 3.9161849710982657, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4949652', 'n_tokens_mistral': 687, 'n_tokens_neox': 650, 'n_words': 165}