Giter Club home page Giter Club logo

Comments (5)

GegznaV avatar GegznaV commented on June 1, 2024

@nevrome, could you attach res__tagger_only__Linux.Rds file, generated in your computer for inspection? The code to generate the file:

library(LanguageToolR)
res__tagger_only <- languagetool(test_text, tagger_only = TRUE)
saveRDS(res__tagger_only, "res__tagger_only__Linux.Rds")

from languagetoolr.

GegznaV avatar GegznaV commented on June 1, 2024

The results on Windows: res__tagger_only__windows.zip

 [1] "Warning: At the moment, your platform (Windows) is not supported by the official XGBoost maven package; ML-based suggestion reordering is disabled."                                                                                                                                                                                                                                                                                                                                                 
 [2] "Expected text language: English (GB)"                                                                                                                                                                                                                                                                                                                                                                                                                                                                
 [3] "Working on C:\\Users\\ViG\\AppData\\Local\\Temp\\RtmpAtnoEG\\file918221bcc4..."                                                                                                                                                                                                                                                                                                                                                                                                                      
 [4] "<S> LanguageTool[LanguageTool/NNP,B-NP-singular|E-NP-singular] offers[offer/NNS,offer/VBZ,B-VP] spell[spell/NN,B-NP-singular|E-NP-singular] and[and/CC,O] grammar[grammar/NN:UN,B-NP-singular] checking[checking/NN:U,check/VBG,E-NP-singular].[./.,</S>./PCT,O] "                                                                                                                                                                                                                                   
 [5] "<S>  Just[Just/NNP,just/RB,just/JJ,just/RP,O] paste[paste/NN:UN,paste/VB,paste/VBP,B-VP] your[your/PRP$,B-NP-singular] text[text/NN:UN,E-NP-singular] here[here/RB,B-ADVP] and[and/CC,O] click[click/NN,click/VB,click/VBP,B-VP] the[the/DT,B-NP-singular] '['/null,E-NP-singular]Check[check/JJ,check/NN:UN,check/UH,check/VB,check/VBP,B-VP] Text[text/NN:UN,B-NP-singular|E-NP-singular]'['/null,B-NP-singular] button[button/NN,button/VB,button/VBP,E-NP-singular].[./.,</S>./PCT,O] "          
 [6] "<S>  Click[click/NN,click/VB,click/VBP,B-NP-plural|E-NP-plural] the[the/DT,B-NP-plural] colored[colored/JJ,I-NP-plural] phrases[phrase/NNS,E-NP-plural] for[for/CC,for/IN,for/RP,B-PP] details[detail/NNS,detail/VBZ,B-NP-plural|E-NP-plural] on[on/IN,on/JJ,on/RP,B-PP] potential[potential/JJ,B-NP-plural] errors[error/NNS,E-NP-plural].[./.,</S>./PCT,O] "                                                                                                                                       
 [7] "<S>  or[or/CC,O] use[use/NN:UN,use/VB,use/VBP,B-VP] this[this/DT,B-NP-singular] text[text/NN:UN,E-NP-singular] too[too/RB,B-ADVP] see[see/NN,see/VB,see/VBP,B-VP] an[a/DT,B-NP-singular] few[few/NN,E-NP-singular] of[of/IN,B-PP] of[of/IN,B-PP] the[the/DT,B-NP-plural] problems[problem/NNS,E-NP-plural] that[that/DT,that/RP,that/WDT,that/WP,B-PP] LanguageTool[LanguageTool/NNP,B-NP-singular|E-NP-singular] can[can/MD,can/NN,can/VB,can/VBP,B-VP] detecd[detecd/null,I-VP].[./.,</S>./PCT,O] "
 [8] "<S>  What[what/WP,B-NP-singular|E-NP-singular] do[do/VB,do/VBP,B-VP] you[you/PRP,B-NP-singular|E-NP-singular] thinks[think/VBZ,B-VP] of[of/IN,B-PP] grammar[grammar/NN:UN,B-NP-plural] checkers[checker/NNS,checker/VBZ,E-NP-plural]?[</S>?/PCT,O] "                                                                                                                                                                                                                                                 
 [9] "<S> Please[please/JJ,please/VB,please/VBP,B-VP] not[not/RB,O] that[that/DT,that/RP,that/WDT,that/WP,B-SBAR] they[they/PRP,B-NP-singular|E-NP-singular] are[be/VBP,B-VP] not[not/RB,O] perfect[perfect/JJ,perfect/NN,perfect/VB,perfect/VBP,B-ADJP].[./.,</S>./PCT,O] "                                                                                                                                                                                                                               
[10] "<S>  Style[style/NN:UN,style/VB,style/VBP,B-NP-plural] issues[issue/NNS,issue/VBZ,E-NP-plural] get[get/VBP,B-VP] a[a/DT,B-NP-singular] blue[blue/JJ,I-NP-singular] marker[marker/NN,E-NP-singular]:[:/:,:/PCT,O] It[it/PRP,B-NP-singular|E-NP-singular]'['/null]s[be/VBZ] 5[5/CD,B-NP-singular] P[P/null].[./.,./PCT]M[M/null].[./.,./PCT] in[in/IN,B-PP] the[the/DT,B-NP-singular] afternoon[afternoon/NN:UN,E-NP-singular].[</S>,O] "                                                              
[11] "<S>  The[the/DT,B-NP-singular] weather[weather/NN:U,E-NP-singular] was[be/VBD,B-VP] nice[nice/JJ,B-ADJP] on[on/IN,on/JJ,on/RP,B-PP] Thursday[Thursday/NNP,B-NP-singular|E-NP-singular],[,/,,,/PCT,O] 27[27/CD,B-NP-singular] June[June/NNP,I-NP-singular] 2017[2017/CD,2017/NNP,E-NP-singular].[./.,</S>./PCT,O] "                                                                                                                                                                                   
[12] "<S> </S><P/> " 

Maybe the problem on Windows is this warning:

Warning: At the moment, your platform (Windows) is not supported by the official XGBoost maven package; ML-based suggestion reordering is disabled.

from languagetoolr.

nevrome avatar nevrome commented on June 1, 2024

On Linux (ManjaroLinux 18.0.4):

[1] "<S> LanguageTool[LanguageTool/NNP,B-NP-singular|E-NP-singular] offers[offer/NNS,offer/VBZ,B-VP] spell[spell/NN,B-NP-singular|E-NP-singular] and[and/CC,O] grammar[grammar/NN:UN,B-NP-singular] checking[checking/NN:U,check/VBG,E-NP-singular].[./.,</S>./PCT,O] "                                                                                                                                                                                                                                  
[2] "<S> Just[Just/NNP,just/RB,just/JJ,just/RP,O] paste[paste/NN:UN,paste/VB,paste/VBP,B-VP] your[your/PRP$,B-NP-singular] text[text/NN:UN,E-NP-singular] here[here/RB,B-ADVP] and[and/CC,O] click[click/NN,click/VB,click/VBP,B-VP] the[the/DT,B-NP-singular] '['/null,E-NP-singular]Check[check/JJ,check/NN:UN,check/UH,check/VB,check/VBP,B-VP] Text[text/NN:UN,B-NP-singular|E-NP-singular]'['/null,B-NP-singular] button[button/NN,button/VB,button/VBP,E-NP-singular].[./.,</S>./PCT,O] "          
[3] "<S> Click[click/NN,click/VB,click/VBP,B-NP-plural|E-NP-plural] the[the/DT,B-NP-plural] colored[colored/JJ,I-NP-plural] phrases[phrase/NNS,E-NP-plural] for[for/CC,for/IN,for/RP,B-PP] details[detail/NNS,detail/VBZ,B-NP-plural|E-NP-plural] on[on/IN,on/JJ,on/RP,B-PP] potential[potential/JJ,B-NP-plural] errors[error/NNS,E-NP-plural].[./.,</S>./PCT,O] "                                                                                                                                       
[4] "<S> or[or/CC,O] use[use/NN:UN,use/VB,use/VBP,B-VP] this[this/DT,B-NP-singular] text[text/NN:UN,E-NP-singular] too[too/RB,B-ADVP] see[see/NN,see/VB,see/VBP,B-VP] an[a/DT,B-NP-singular] few[few/NN,E-NP-singular] of[of/IN,B-PP] of[of/IN,B-PP] the[the/DT,B-NP-plural] problems[problem/NNS,E-NP-plural] that[that/DT,that/RP,that/WDT,that/WP,B-PP] LanguageTool[LanguageTool/NNP,B-NP-singular|E-NP-singular] can[can/MD,can/NN,can/VB,can/VBP,B-VP] detecd[detecd/null,I-VP].[./.,</S>./PCT,O] "
[5] "<S> What[what/WP,B-NP-singular|E-NP-singular] do[do/VB,do/VBP,B-VP] you[you/PRP,B-NP-singular|E-NP-singular] thinks[think/VBZ,B-VP] of[of/IN,B-PP] grammar[grammar/NN:UN,B-NP-plural] checkers[checker/NNS,checker/VBZ,E-NP-plural]?[</S>?/PCT,O] "                                                                                                                                                                                                                                                 
[6] "<S> Please[please/JJ,please/VB,please/VBP,B-VP] not[not/RB,O] that[that/DT,that/RP,that/WDT,that/WP,B-SBAR] they[they/PRP,B-NP-singular|E-NP-singular] are[be/VBP,B-VP] not[not/RB,O] perfect[perfect/JJ,perfect/NN,perfect/VB,perfect/VBP,B-ADJP].[./.,</S>./PCT,O] "                                                                                                                                                                                                                              
[7] "<S> Style[style/NN:UN,style/VB,style/VBP,B-NP-plural] issues[issue/NNS,issue/VBZ,E-NP-plural] get[get/VBP,B-VP] a[a/DT,B-NP-singular] blue[blue/JJ,I-NP-singular] marker[marker/NN,E-NP-singular]:[:/:,:/PCT,O] It[it/PRP,B-NP-singular|E-NP-singular]'['/null]s[be/VBZ] 5[5/CD,B-NP-singular] P[P/null].[./.,./PCT]M[M/null].[./.,./PCT] in[in/IN,B-PP] the[the/DT,B-NP-singular] afternoon[afternoon/NN:UN,E-NP-singular].[</S>,O] "                                                              
[8] "<S> The[the/DT,B-NP-singular] weather[weather/NN:U,E-NP-singular] was[be/VBD,B-VP] nice[nice/JJ,B-ADJP] on[on/IN,on/JJ,on/RP,B-PP] Thursday[Thursday/NNP,B-NP-singular|E-NP-singular],[,/,,,/PCT,O] 27[27/CD,B-NP-singular] June[June/NNP,I-NP-singular] 2017[2017/CD,2017/NNP,E-NP-singular].[./.,</S>./PCT,O] " 

Do you need the file? I should not contain more than the text posted above.

Does LanguageTool work on the command line in Windows?

from languagetoolr.

GegznaV avatar GegznaV commented on June 1, 2024

I falsely thought that tagger_only = TRUE should return output in JSON format. But I was wrong.


What is the output of this code on Linux?

java -jar "~/LanguageTool-4.6/languagetool-commandline.jar" --encoding utf-8 --language en-GB --json "inst/test/test_text.txt"

("inst/test/test_text.txt" is a file with test_text)

from languagetoolr.

GegznaV avatar GegznaV commented on June 1, 2024

There are at least two things that cause the issue:

  1. Either an incorrect version of JAVA was used or incorrect code was used to call that version of JAVA (see #11)
  2. After JAVA issue was solved, in addition to the string with JSON output, system() generated some additional lines with a warning and other kinds of messages, which were tried to be parsed as JSON. And this resulted in an error.

from languagetoolr.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.