<commit_before># GeoIP Java API [![Build Status](https://travis-ci.org/maxmind/geoip-api-java.png?branch=master)](https://travis-ci.org/maxmind/geoip-api-java) #

## Define Your Dependencies ##

We recommend installing this package with Maven. To do this, add the dependency to your pom.xml:

```xml
    <dependency>
        <groupId>com.maxmind.geoip</groupId>
        <artifactId>geoip-api</artifactId>
        <version>1.2.11</version>
    </dependency>
```

## Building Manually ##

### Installation ###
    mvn clean install

### Packaging ###
    mvn package

The jar file will be in the `target` directory.

### Testing ###
    mvn test

## Memory Caching and Other Options ##

The following options can be passed as the second parameter to the
`LookupService` constructor.

* `GEOIP_STANDARD` - Read database from file system. Uses the least memory.
* `GEOIP_MEMORY_CACHE` - Load database into memory. This provides faster
  performance but uses more memory
* `GEOIP_CHECK_CACHE` - Check for updated database.  If database has been
  updated, reload file handle and/or memory cache.<commit_msg>Fixed version in Maven example<commit_after># GeoIP Java API [![Build Status](https://travis-ci.org/maxmind/geoip-api-java.png?branch=master)](https://travis-ci.org/maxmind/geoip-api-java) #

## Define Your Dependencies ##

We recommend installing this package with Maven. To do this, add the dependency to your pom.xml:

```xml
    <dependency>
        <groupId>com.maxmind.geoip</groupId>
        <artifactId>geoip-api</artifactId>
        <version>1.2.12</version>
    </dependency>
```

## Building Manually ##

### Installation ###
    mvn clean install

### Packaging ###
    mvn package

The jar file will be in the `target` directory.

### Testing ###
    mvn test

## Memory Caching and Other Options ##

The following options can be passed as the second parameter to the
`LookupService` constructor.

* `GEOIP_STANDARD` - Read database from file system. Uses the least memory.
* `GEOIP_MEMORY_CACHE` - Load database into memory. This provides faster
  performance but uses more memory
* `GEOIP_CHECK_CACHE` - Check for updated database.  If database has been
  updated, reload file handle and/or memory cache.
{'fraction_non_alphanumeric': 0.11256190904997748, 'fraction_numerical': 0.0036019810895992796, 'mean_word_length': 3.819956616052061, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '35662', 'n_tokens_mistral': 693, 'n_tokens_neox': 660, 'n_words': 223}