Skip to content

Commit

Permalink
Set up as JAR
Browse files Browse the repository at this point in the history
  • Loading branch information
Dargones committed Aug 3, 2024
1 parent b65727a commit f67bf0e
Show file tree
Hide file tree
Showing 80 changed files with 8,410 additions and 371 deletions.
93 changes: 45 additions & 48 deletions .github/workflows/exampleExpectedResult.tsv
Original file line number Diff line number Diff line change
@@ -1,48 +1,45 @@
file,acrostic,rank
data/example/Flint and Feather (1914)Part 3Canada.txt canada 1053.8960
data/example/The PearlVolume 18Acrostic - The Martyr.txt fuck_my_cunt_dear_papa 2536.9493
data/example/Flint and Feather (1914)Part 3Brandon.txt brandon 3092.9519
data/example/The Canadian soldiers' song book.djvu57.txt mother 3164.0043
data/example/Devon and Cornwall Notes and Queries.djvu21.txt thomas 4477.4781
data/example/Notes and Queries - Series 12 - Volume 4.djvu257.txt mary_stokes 13933.539
data/example/The PearlVolume 18Acrostic - Madrigal.txt cunt_prick_fuck 14796.506
data/example/Whole prophecies of Scotland, England, Ireland, France, and Denmark (1).pdf46.txt sonne_of_god_the 23421.687
data/example/Through the Looking-Glass, and What Alice Found There.djvu243.txt alice_pleas_and 65249.310
data/example/The Elements of LawPart IChapter 1.txt thomas_of 100742.81
data/example/Archaeological Journal, Volume 29.djvu98.txt the_us_parker 205516.31
data/example/Love's trilogy.djvu79.txt perhaps 239268.61
data/example/Life and wonderful prophecies of Donald Cargill (1).pdf24.txt master_donald 550373.21
data/example/Life and wonderful prophecies of Donald Cargill (2).pdf24.txt master_donald 550373.21
data/example/Amazing Stories Volume 17 Number 06.djvu6.txt amazing 565896.26
data/example/Sentimental valentine writer.pdf11.txt william 1024341.2
data/example/New mirror of love.pdf24.txt william 1024341.2
data/example/Clouds without Water (Crowley, 1909).djvu24.txt kathleen_bruce 1414519.3
data/example/Collingwood - Life and Letters of Lewis Carroll.djvu388.txt agnes_georgina_hull 1857954.0
data/example/United States Army Field Manual 7-93 Long-Range Surveillance Unit OperationsAppendix F.txt survival 1914206.3
data/example/The Confessions of William-Henry Ireland.txt tail_chaucer_fa_pali_at_chatterton 2949134.8
data/example/New mirror of love.pdf19.txt love_you_henry 3346046.1
data/example/Notes and Queries - Series 2 - Volume 1.djvu216.txt william_bed_low 3895124.0
data/example/Carroll - Rhyme and Reason.djvu11.txt gertrude_chat_away 4860150.2
data/example/The Hunting of the Snark (1876).djvu11.txt gertrude_chat_away 4860150.2
data/example/Elegy upon the death of that famous and faithful minister and martyr Mr. James Renwick.pdf11.txt master_james 8328207.9
data/example/The Alchemist (Jonson)Argument.txt the_alchemist 11557749
data/example/The Works of Ben Jonson - Gifford - Volume 4.djvu13.txt the_alchemist 11557749
data/example/Carroll - Three Sunsets.djvu83.txt prince_charlie 14336506
data/example/Christian Astrology.txt william_lilly 22086068
data/example/Ben King's VerseAsphodel.txt cornelia_bassett 22318962
data/example/Notes and Queries - Series 9 - Volume 2.djvu394.txt charles_franck 37175627
data/example/Whole prophecies of Scotland, England, Ireland, France & Denmark.pdf46.txt christ_sonne_of_god_the 86669560
data/example/Most remarkable passages in the life of the honourable Colonel James Gardiner.pdf24.txt james_gardiner 1.2227672E+8
data/example/An Acrostic.txt elizabeth 3.2799235E+8
data/example/Through the looking-glass and what Alice found there (IA throughlookinggl00carr4).pdf323.txt alice_pleasance_liddell 5.0375007E+8
data/example/Complete Works of Lewis Carroll.djvu292.txt alice_pleasance_liddell 5.0375007E+8
data/example/Notes by the Way.djvu61.txt to_joseph_knight 1.6465724E+9
data/example/This Canada of ours and other poems.djvu39.txt as_the_great_divided 1.8429494E+10
data/example/The complete poetical works and letters of John Keats, 1899.djvu279.txt georgiana_augusta_keats 4.0955944E+10
data/example/Good news to Scotland (2).pdf2.txt master_richard_cameron 1.6211098E+11
data/example/Good news to Scotland (1).pdf2.txt master_richard_cameron 1.6211098E+11
data/example/St. Nicholas - Volume 41, Part 1.djvu59.txt thanksgiving 4.1471177E+11
data/example/Elizabeth (Poe).txt elizabeth_rebecca 1.6337993E+12
data/example/The Old GuardVolume 1Issue 1Acrostic.txt george_washington 3.5446523E+12
data/example/The PearlVolume 18Acrostic.txt cunt_is_sweet_when_young_and_tender 3.6600743E+12
data/example/The Confessions of William-Henry Ireland.txt warwick_at_dudley_at_southampton_at_rivers_at_shakspeare 7.6181055E+27
file,acrostic,rank
data/demo/Flint and Feather (1914)Part 3Canada.txt canada 1053.8960
data/demo/Flint and Feather (1914)Part 3Brandon.txt brandon 3092.9519
data/demo/The Canadian soldiers' song book.djvu57.txt mother 3164.0043
data/demo/Devon and Cornwall Notes and Queries.djvu21.txt thomas 4477.4781
data/demo/Notes and Queries - Series 12 - Volume 4.djvu257.txt mary_stokes 13933.539
data/demo/Whole prophecies of Scotland, England, Ireland, France, and Denmark (1).pdf46.txt sonne_of_god_the 23421.687
data/demo/Through the Looking-Glass, and What Alice Found There.djvu243.txt alice_pleas_and 65249.310
data/demo/The Elements of LawPart IChapter 1.txt thomas_of 100742.81
data/demo/Archaeological Journal, Volume 29.djvu98.txt the_us_parker 205516.31
data/demo/Love's trilogy.djvu79.txt perhaps 239268.61
data/demo/Life and wonderful prophecies of Donald Cargill (2).pdf24.txt master_donald 550373.21
data/demo/Life and wonderful prophecies of Donald Cargill (1).pdf24.txt master_donald 550373.21
data/demo/Amazing Stories Volume 17 Number 06.djvu6.txt amazing 565896.26
data/demo/Sentimental valentine writer.pdf11.txt william 1024341.2
data/demo/New mirror of love.pdf24.txt william 1024341.2
data/demo/Clouds without Water (Crowley, 1909).djvu24.txt kathleen_bruce 1414519.3
data/demo/Collingwood - Life and Letters of Lewis Carroll.djvu388.txt agnes_georgina_hull 1857954.0
data/demo/United States Army Field Manual 7-93 Long-Range Surveillance Unit OperationsAppendix F.txt survival 1914206.3
data/demo/The Confessions of William-Henry Ireland.txt tail_chaucer_fa_pali_at_chatterton 2949134.8
data/demo/New mirror of love.pdf19.txt love_you_henry 3346046.1
data/demo/Notes and Queries - Series 2 - Volume 1.djvu216.txt william_bed_low 3895124.0
data/demo/The Hunting of the Snark (1876).djvu11.txt gertrude_chat_away 4860150.2
data/demo/Carroll - Rhyme and Reason.djvu11.txt gertrude_chat_away 4860150.2
data/demo/Elegy upon the death of that famous and faithful minister and martyr Mr. James Renwick.pdf11.txt master_james 8328207.9
data/demo/The Alchemist (Jonson)Argument.txt the_alchemist 11557749
data/demo/The Works of Ben Jonson - Gifford - Volume 4.djvu13.txt the_alchemist 11557749
data/demo/Carroll - Three Sunsets.djvu83.txt prince_charlie 14336506
data/demo/Christian Astrology.txt william_lilly 22086068
data/demo/Ben King's VerseAsphodel.txt cornelia_bassett 22318962
data/demo/Notes and Queries - Series 9 - Volume 2.djvu394.txt charles_franck 37175627
data/demo/Whole prophecies of Scotland, England, Ireland, France & Denmark.pdf46.txt christ_sonne_of_god_the 86669560
data/demo/Most remarkable passages in the life of the honourable Colonel James Gardiner.pdf24.txt james_gardiner 1.2227672E+8
data/demo/An Acrostic.txt elizabeth 3.2799235E+8
data/demo/Complete Works of Lewis Carroll.djvu292.txt alice_pleasance_liddell 5.0375007E+8
data/demo/Through the looking-glass and what Alice found there (IA throughlookinggl00carr4).pdf323.txt alice_pleasance_liddell 5.0375007E+8
data/demo/Notes by the Way.djvu61.txt to_joseph_knight 1.6465724E+9
data/demo/This Canada of ours and other poems.djvu39.txt as_the_great_divided 1.8429494E+10
data/demo/The complete poetical works and letters of John Keats, 1899.djvu279.txt georgiana_augusta_keats 4.0955944E+10
data/demo/Good news to Scotland (1).pdf2.txt master_richard_cameron 1.6211098E+11
data/demo/Good news to Scotland (2).pdf2.txt master_richard_cameron 1.6211098E+11
data/demo/St. Nicholas - Volume 41, Part 1.djvu59.txt thanksgiving 4.1471177E+11
data/demo/Elizabeth (Poe).txt elizabeth_rebecca 1.6337993E+12
data/demo/The Old GuardVolume 1Issue 1Acrostic.txt george_washington 3.5446523E+12
data/demo/The Confessions of William-Henry Ireland.txt warwick_at_dudley_at_southampton_at_rivers_at_shakspeare 7.6181055E+27
29 changes: 24 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,36 @@ jobs:
fetch-depth: 0
submodules: true

- name: Compile and Run
- name: Run Release
run: |
javac -encoding UTF-8 -cp src src/acrostics/*.java
java -cp src acrostics.Main -input data/example -language EN -mode LINE -charset utf-8 -outputSize 4000 --concise > result.tsv
java -jar AcrosticSleuth.jar -input data/demo -language EN -mode LINE -charset utf-8 -outputSize 4000 --concise
- name: Test on Mac or Ubuntu
- name: Test Release on Mac or Ubuntu
if: matrix.os != 'windows-latest'
run: |
diff -w result.tsv .github/workflows/exampleExpectedResult.tsv
- name: Test on Windows
- name: Test Release on Windows
if: matrix.os == 'windows-latest'
run: |
(Get-Content result.tsv) -replace '\\', '/' | Set-Content result_normalized.tsv
(Get-Content .github\workflows\exampleExpectedResult.tsv) -replace '\\', '/' | Set-Content exampleExpectedResult_normalized.tsv
(Get-Content result_normalized.tsv) -replace '^\s+|\s+$', '' -replace '\s+', ' ' | Sort-Object | Set-Content result_sorted.tsv
(Get-Content exampleExpectedResult_normalized.tsv) -replace '^\s+|\s+$', '' -replace '\s+', ' ' | Sort-Object | Set-Content exampleExpectedResult_sorted.tsv
fc.exe result_sorted.tsv exampleExpectedResult_sorted.tsv
- name: Build From Source and Run
run: |
javac -d out -cp src src/acrosticsleuth/*.java
jar cfe AcrosticSleuth.jar acrosticsleuth.Main -C out . -C models .
java -jar AcrosticSleuth.jar -input data/demo -language EN -mode LINE -charset utf-8 -outputSize 4000 --concise
- name: Test Build on Mac or Ubuntu
if: matrix.os != 'windows-latest'
run: |
diff -w result.tsv .github/workflows/exampleExpectedResult.tsv
- name: Test Build on Windows
if: matrix.os == 'windows-latest'
run: |
(Get-Content result.tsv) -replace '\\', '/' | Set-Content result_normalized.tsv
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ models/*
!models/RU_cm.csv
!models/FR.vocab
!models/FR_cm.csv
!models/LA.vocab
!models/LA_cm.csv
EN_Figure.svg
RU_Figure.svg
FR_Figure.svg
Expand Down
Binary file added AcrosticSleuth.jar
Binary file not shown.
Loading

0 comments on commit f67bf0e

Please sign in to comment.