<commit_before>docconv
==============

A Golang wrapper library to convert PDF, DOC, DOCX, XML, HTML, RTF, ODT, PAGES, etc to plain text

The compiled binary runs as either 
a) a service on port 8888 (by default)

Documents can be sent as a multipart POST request and the plain text (body) and meta information are then returned as a JSON object

b) via the command line. 

Documents can be sent as an argument, e.g. 

```./docconv -input=document.pdf```

### Dependencies
tidy, wv, popplerutils, unrtf, github.com/JalfResi/justext

Example install of dependencies (not all systems):

```sudo apt-get install poppler-utils wv unrtf tidy``` 
```go get github.com/JalfResi/justext``` 

### Optional Flags<commit_msg>Tidied up README a bit<commit_after># docconv

A Go wrapper library to convert PDF, DOC, DOCX, XML, HTML, RTF, ODT, PAGES, etc to plain text.

The compiled binary runs as either 
a) a service on port 8888 (by default)

Documents can be sent as a multipart POST request and the plain text (body) and meta information are then returned as a JSON object

b) via the command line. 

Documents can be sent as an argument, e.g. 

```./docconv -input=document.pdf```

### Dependencies
tidy, wv, popplerutils, unrtf, github.com/JalfResi/justext

Example install of dependencies (not all systems):

```sudo apt-get install poppler-utils wv unrtf tidy``` 
```go get github.com/JalfResi/justext``` 

### Optional Flags
{'fraction_non_alphanumeric': 0.10274454609429978, 'fraction_numerical': 0.005629838142153413, 'mean_word_length': 4.386363636363637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '2904174', 'n_tokens_mistral': 486, 'n_tokens_neox': 438, 'n_words': 198}