<commit_before>#!/bin/bash
JAVA=$JAVA_HOME/bin/java
if [ "x$JAVA_HOME" = "x" ]; then
 JAVA=java
fi

vers=`$JAVA -version 2>&1 | grep "java version" | awk '{print $3}' | tr -d \"`
echo "using java $vers from $JAVA_HOME"

FILE=$1
ALGO=$2
CLASS=$3

if [ "x$ALGO" = "xui" ]; then
 CLASS=com.graphhopper.ui.MiniGraphUI
else
 CLASS=com.graphhopper.reader.OSMReader
fi

if [ "x$ALGO" = "x" ]; then
 ALGO=astar
fi

if [ "x$FILE" = "x" ]; then
 FILE=unterfranken.osm
fi

# file without extension if any
NAME="${FILE%.*}"
OSM=$NAME.osm

GRAPH=$NAME-gh
VERSION=`grep  "<name>" -A 1 pom.xml | grep version | cut -d'>' -f2 | cut -d'<' -f1`
JAR=target/graphhopper-$VERSION-jar-with-dependencies.jar

# file without path
TMP=$(basename "$FILE")
TMP="${TMP%.*}"
#echo $TMP - $FILE - $NAME
if [ "$TMP" = "unterfranken" ]; then
 LINK="http://download.geofabrik.de/openstreetmap/europe/germany/bayern/unterfranken.osm.bz2"
 JAVA_OPTS_IMPORT="-XX:PermSize=20m -XX:MaxPermSize=20m -Xmx500m -Xms500m"
 JAVA_OPTS=$JAVA_OPTS_IMPORT
 SIZE=3000000
elif [ "$TMP" = "germany" ]; then
 LINK=http://download.geofabrik.de/openstreetmap/europe/germany.osm.bz2

 # For import we need a lot more memory. For the mmap storage you need to lower this in order to use off-heap memory.
 JAVA_OPTS_IMPORT="-XX:PermSize=10m -XX:MaxPermSize=10m -Xmx2200m -Xms2200m"
 JAVA_OPTS="-XX:PermSize=20m -XX:MaxPermSize=20m -Xmx1900m -Xms1900m"
 SIZE=35000000
elif [ -f $OSM ]; then
 LINK=""
 JAVA_OPTS_IMPORT="-XX:PermSize=20m -XX:MaxPermSize=20m -Xmx1000m -Xms1000m"
 JAVA_OPTS=$JAVA_OPTS_IMPORT
 SIZE=10000000
else
 echo "Sorry, your osm file $OSM was not found ... exiting"
 exit   
fi

if [ ! -f "config.properties" ]; then
  cp config-example.properties config.properties
fi

if [ ! -f "$OSM" ]; then
  echo "No OSM file found or specified. Press ENTER to grab one from internet."
  echo "Press CTRL+C if you do not have enough disc space or you don't want to download several MB."<commit_msg>minor increase of permsize<commit_after>#!/bin/bash
JAVA=$JAVA_HOME/bin/java
if [ "x$JAVA_HOME" = "x" ]; then
 JAVA=java
fi

vers=`$JAVA -version 2>&1 | grep "java version" | awk '{print $3}' | tr -d \"`
echo "using java $vers from $JAVA_HOME"

FILE=$1
ALGO=$2
CLASS=$3

if [ "x$ALGO" = "xui" ]; then
 CLASS=com.graphhopper.ui.MiniGraphUI
else
 CLASS=com.graphhopper.reader.OSMReader
fi

if [ "x$ALGO" = "x" ]; then
 ALGO=astar
fi

if [ "x$FILE" = "x" ]; then
 FILE=unterfranken.osm
fi

# file without extension if any
NAME="${FILE%.*}"
OSM=$NAME.osm

GRAPH=$NAME-gh
VERSION=`grep  "<name>" -A 1 pom.xml | grep version | cut -d'>' -f2 | cut -d'<' -f1`
JAR=target/graphhopper-$VERSION-jar-with-dependencies.jar

# file without path
TMP=$(basename "$FILE")
TMP="${TMP%.*}"
#echo $TMP - $FILE - $NAME
if [ "$TMP" = "unterfranken" ]; then
 LINK="http://download.geofabrik.de/openstreetmap/europe/germany/bayern/unterfranken.osm.bz2"
 JAVA_OPTS_IMPORT="-XX:PermSize=30m -XX:MaxPermSize=30m -Xmx500m -Xms500m"
 JAVA_OPTS=$JAVA_OPTS_IMPORT
 SIZE=3000000
elif [ "$TMP" = "germany" ]; then
 LINK=http://download.geofabrik.de/openstreetmap/europe/germany.osm.bz2

 # For import we need a lot more memory. For the mmap storage you need to lower this in order to use off-heap memory.
 JAVA_OPTS_IMPORT="-XX:PermSize=30m -XX:MaxPermSize=30m -Xmx2200m -Xms2200m"
 JAVA_OPTS="-XX:PermSize=30m -XX:MaxPermSize=30m -Xmx1900m -Xms1900m"
 SIZE=35000000
elif [ -f $OSM ]; then
 LINK=""
 JAVA_OPTS_IMPORT="-XX:PermSize=30m -XX:MaxPermSize=30m -Xmx1000m -Xms1000m"
 JAVA_OPTS=$JAVA_OPTS_IMPORT
 SIZE=10000000
else
 echo "Sorry, your osm file $OSM was not found ... exiting"
 exit   
fi

if [ ! -f "config.properties" ]; then
  cp config-example.properties config.properties
fi

if [ ! -f "$OSM" ]; then
  echo "No OSM file found or specified. Press ENTER to grab one from internet."
  echo "Press CTRL+C if you do not have enough disc space or you don't want to download several MB."
{'fraction_non_alphanumeric': 0.15349194167306215, 'fraction_numerical': 0.04093118444614991, 'mean_word_length': 4.400552486187845, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5838337', 'n_tokens_mistral': 1717, 'n_tokens_neox': 1573, 'n_words': 396}