<commit_before>package au.gov.amsa.navigation;

import java.io.FileNotFoundException;
import java.io.IOException;

import au.gov.amsa.ais.rx.Streams;
import au.gov.amsa.navigation.ais.AisVesselPositions;

public class DriftDetectorMain {

    public static void main(String[] args) throws FileNotFoundException, IOException {
        String filename = "/media/analysis/nmea/2013/NMEA_ITU_20130108.gz";
        Streams.nmeaFromGzip(filename).compose(AisVesselPositions.positions())
                .compose(DriftDetector.detectDrift())
                // group by mmsi
                .groupBy(f -> f.fix().mmsi())
                // first position
                .flatMap(positions -> positions.first())
                //
                .doOnNext(System.out::println)
                // go
                .subscribe();
    }

}<commit_msg>drift detector dev<commit_after>package au.gov.amsa.navigation;

import java.io.FileNotFoundException;
import java.io.IOException;

import au.gov.amsa.ais.rx.Streams;
import au.gov.amsa.navigation.ais.AisVesselPositions;

import com.github.davidmoten.rx.slf4j.Logging;

public class DriftDetectorMain {

    public static void main(String[] args) throws FileNotFoundException, IOException {
        String filename = "/media/an/nmea/2013/NMEA_ITU_20130108.gz";
        Streams.nmeaFromGzip(filename).lift(Logging.<String> logger().every(10000).log())
        //
                .compose(AisVesselPositions.positions()).compose(DriftDetector.detectDrift())
                // group by mmsi
                .groupBy(f -> f.fix().mmsi())
                // first position
                .flatMap(positions -> positions.first())
                //
                .doOnNext(System.out::println)
                //
                .doOnError(System.err::println)
                //
                .count().toBlocking().single();
    }

}
{'fraction_non_alphanumeric': 0.12147043153969099, 'fraction_numerical': 0.015982951518380393, 'mean_word_length': 2.13, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, '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': '3636392', 'n_tokens_mistral': 604, 'n_tokens_neox': 551, 'n_words': 81}