<commit_before>BWIPP Helper C Library and Bindings
===================================

The purpose of the C library and SWIG-based bindings for other languages is to
provide helper functions for manipulating the Barcode Writer in Pure PostScript
resources based on metadata contained within the monolithic barcode.ps file.

It is hoped that these can provide a stable and robust interface to BWIPP that
avoids the need for frontends to parse and process the PostScript resource file
directly or embed lots of static data about the resources in the code.


How to build and use the various bindings
-----------------------------------------

**Python**

```
cd python
swig -Wall -python postscriptbarcode.i
python setup.py build_ext --inplace
LD_LIBRARY_PATH=. ./example.py
```

**Perl**

```
cd perl
swig -Wall -perl postscriptbarcode.i
./Makefile.PL
make
LD_LIBRARY_PATH=blib/arch/auto/postscriptbarcode ./example.pl
```


**Ruby**

```
cd ruby
swig -Wall -ruby postscriptbarcode.i
ruby extconf.rb
make
./example.rb
```


**Java**

```
cd java
swig -Wall -java postscriptbarcode.i
gcc -fPIC -Wall -Wextra -shared postscriptbarcode.c postscriptbarcode_wrap.c         \
    -o libpostscriptbarcode.so -L../c -lpostscriptbarcode                            \
    -I/usr/lib/jvm/java-8-oracle/include -I/usr/lib/jvm/java-8-oracle/include/linux
LD_LIBRARY_PATH=. java example
```<commit_msg>Update README.md.<commit_after>BWIPP Helper C Library and Bindings
===================================

The purpose of the C library and SWIG-based bindings for other languages is to
provide helper functions for manipulating the Barcode Writer in Pure PostScript
resources based on metadata contained within the monolithic barcode.ps file.

It is hoped that these can provide a stable and robust interface to BWIPP that
avoids the need for frontends to parse and process the PostScript resource file
directly or embed lots of static data about the resources in their code.


How to build and use the various bindings
-----------------------------------------

**Python**

```
cd python
swig -Wall -python postscriptbarcode.i
python setup.py build_ext --inplace
LD_LIBRARY_PATH=. ./example.py
```

**Perl**

```
cd perl
swig -Wall -perl postscriptbarcode.i
./Makefile.PL
make
LD_LIBRARY_PATH=blib/arch/auto/postscriptbarcode ./example.pl
```


**Ruby**

```
cd ruby
swig -Wall -ruby postscriptbarcode.i
ruby extconf.rb
make
./example.rb
```


**Java**

```
cd java
swig -Wall -java postscriptbarcode.i
gcc -fPIC -Wall -Wextra -shared postscriptbarcode.c postscriptbarcode_wrap.c \
    -o libpostscriptbarcode.so -L../c -lpostscriptbarcode                    \
    -I/usr/lib/jvm/java-8-oracle/include                                     \
    -I/usr/lib/jvm/java-8-oracle/include/linux
LD_LIBRARY_PATH=. java example
```
{'fraction_non_alphanumeric': 0.13720598717034926, 'fraction_numerical': 0.0014255167498218105, 'mean_word_length': 3.1158357771260996, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5581080', 'n_tokens_mistral': 900, 'n_tokens_neox': 829, 'n_words': 297}