-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplify build by loading words directly from a plain text file inste…
…ad of a binary (it's even faster and the plain text file isn't larger)
- Loading branch information
1 parent
ea77049
commit 11117fe
Showing
9 changed files
with
45 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
#!/bin/sh | ||
# Build the binary dictionary, then build the artifact | ||
# Build the dictionary | ||
|
||
RESOURCES=src/main/resources/de/danielnaber/jwordsplitter | ||
BIN_FILE=$RESOURCES/wordsGerman.ser | ||
ALL_WORDS=$RESOURCES/all-words.txt | ||
TXT_FILE=$RESOURCES/wordsGerman.txt | ||
|
||
echo "Removing $BIN_FILE" | ||
rm $BIN_FILE | ||
echo "Removing $RESOURCES/all-words.txt" | ||
rm $ALL_WORDS | ||
echo "Removing $TXT_FILE" | ||
rm $TXT_FILE | ||
|
||
mvn clean package -DskipTests | ||
grep -v -f $RESOURCES/removals.txt $RESOURCES/languagetool-dict.txt | cat - $RESOURCES/additions.txt $RESOURCES/germanPrefixes.txt | grep -v "^#" >$ALL_WORDS | ||
java -cp target/jwordsplitter-*-SNAPSHOT.jar de.danielnaber.jwordsplitter.converter.SerializeDict $ALL_WORDS $BIN_FILE | ||
echo "# DO NOT EDIT -- File generated by build.sh" >$TXT_FILE | ||
echo -n "# " >>$TXT_FILE | ||
date >>$TXT_FILE | ||
grep -v -f $RESOURCES/removals.txt $RESOURCES/languagetool-dict.txt | cat - $RESOURCES/additions.txt $RESOURCES/germanPrefixes.txt | grep -v "^#" >>$TXT_FILE | ||
|
||
mvn clean package | ||
echo "Writing new file to: $BIN_FILE" | ||
#mvn clean package | ||
echo "Writing new file to: $TXT_FILE" | ||
echo -n "Result: " | ||
ls -l $BIN_FILE | ||
ls -l $TXT_FILE | ||
|
||
echo -n "Total lines: " | ||
wc -l $ALL_WORDS | ||
rm $ALL_WORDS | ||
wc -l $TXT_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 0 additions & 48 deletions
48
src/main/java/de/danielnaber/jwordsplitter/converter/ExportDict.java
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
src/main/java/de/danielnaber/jwordsplitter/converter/SerializeDict.java
This file was deleted.
Oops, something went wrong.
59 changes: 0 additions & 59 deletions
59
src/main/java/de/danielnaber/jwordsplitter/tools/FastObjectSaver.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters