<commit_before>![golucy](https://raw.github.com/philipsoutham/golucy/devel/artwork/golucy.png)

# golucy
Go bindings for [Apache Lucy][1]. The [Apache Lucy][1] search engine library provides full-text search for dynamic
programming languages. It is a "loose C" port of the [Apache Lucene™][2] search engine library for Java.


## Dependencies

### Go
Duh.

### Lucy
Works as of commit [e19687f9a6b0158308ac7bcafc663296635b107a][3].
```shell
$ export BUILD_DIR=$HOME/build
$ export LUCY_HOME=$HOME/.local/lucy
$ cd $BUILD_DIR
$ git clone https://git-wip-us.apache.org/repos/asf/lucy.git
$ cd $BUILD_DIR/lucy/c
$ ./configure --prefix=$LUCY_HOME
$ make && make test && make install
$ ./install --prefix=$LUCY_HOME
$ cd $BUILD_DIR/lucy/clownfish/runtime/c
$ ./configure --prefix=$LUCY_HOME
$ make && make test && make install
$ ./install --prefix=$LUCY_HOME
```
### Configuration
Add the following to your `.profile` or `.zshrc` or similar (you will also need to have your `GOHOME` and/or `GOPATH` set).
```bash
export LUCY_HOME=$HOME/.local/lucy
export CGO_LDFLAGS="-L$LUCY_HOME/lib -llucy -lcfish ${CGO_LDFLAGS}"
export CGO_CFLAGS="-I$LUCY_HOME/include ${CGO_CFLAGS}"
export LD_LIBRARY_PATH=$LUCY_HOME/lib:$LD_LIBRARY_PATH
```

## Installation
Provided you have the dependencies in order a simple
```shell
$ go get github.com/philipsoutham/golucy
```
should suffice.

## Example
See [this example][4], inspired by [this][5] one in C.
If you're running [docker](http://docker.io) you can use [this `Dockerfile`][6] to run 
the [`golucy_getting_started.go`][4] sample. 

```shell<commit_msg>Fix glitches in "install" recipe.<commit_after>![golucy](https://raw.github.com/philipsoutham/golucy/devel/artwork/golucy.png)

# golucy
Go bindings for [Apache Lucy][1]. The [Apache Lucy][1] search engine library provides full-text search for dynamic
programming languages. It is a "loose C" port of the [Apache Lucene™][2] search engine library for Java.


## Dependencies

### Go
Duh.

### Lucy
Works as of commit [e19687f9a6b0158308ac7bcafc663296635b107a][3].
```shell
$ export BUILD_DIR=$HOME/build
$ export LUCY_HOME=$HOME/.local/lucy
$ cd $BUILD_DIR
$ git clone https://git-wip-us.apache.org/repos/asf/lucy.git
$ cd $BUILD_DIR/lucy/c
$ ./configure --prefix=$LUCY_HOME
$ make && make test && make install
$ ./install.sh --prefix $LUCY_HOME
$ cd $BUILD_DIR/lucy/clownfish/runtime/c
$ ./configure --prefix=$LUCY_HOME
$ make && make test && make install
$ ./install.sh --prefix $LUCY_HOME
```
### Configuration
Add the following to your `.profile` or `.zshrc` or similar (you will also need to have your `GOHOME` and/or `GOPATH` set).
```bash
export LUCY_HOME=$HOME/.local/lucy
export CGO_LDFLAGS="-L$LUCY_HOME/lib -llucy -lcfish ${CGO_LDFLAGS}"
export CGO_CFLAGS="-I$LUCY_HOME/include ${CGO_CFLAGS}"
export LD_LIBRARY_PATH=$LUCY_HOME/lib:$LD_LIBRARY_PATH
```

## Installation
Provided you have the dependencies in order a simple
```shell
$ go get github.com/philipsoutham/golucy
```
should suffice.

## Example
See [this example][4], inspired by [this][5] one in C.
If you're running [docker](http://docker.io) you can use [this `Dockerfile`][6] to run 
the [`golucy_getting_started.go`][4] sample. 

```shell
{'fraction_non_alphanumeric': 0.1478125, 'fraction_numerical': 0.021875, 'mean_word_length': 4.949814126394052, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '581861', 'n_tokens_mistral': 1264, 'n_tokens_neox': 1163, 'n_words': 309}