Git Product home page Git Product logo

Comments (8)

unDocUMeantIt avatar unDocUMeantIt commented on August 20, 2024

hi thomas,
try ?query, e.g. assuming your tagged object is called your_text:

# filter by word class
query(your_text, var="wclass", query="name")
# or by POS tag
query(your_text, var="tag", query="NP")

from korpus.

thomasrenkert avatar thomasrenkert commented on August 20, 2024

Hi, thanks for your quick reply!

I get the error

Invalid var for class kRp.tagged: tag

from korpus.

unDocUMeantIt avatar unDocUMeantIt commented on August 20, 2024

which version of koRpus are you using? there were bugs in query() fixed in 0.12-1.

from korpus.

thomasrenkert avatar thomasrenkert commented on August 20, 2024

I've tested it with the latest CRAN version and also with the development version from github. The error persists.

from korpus.

unDocUMeantIt avatar unDocUMeantIt commented on August 20, 2024

that's odd, i can't reproduce the issue. could you please

  1. give some environmental data on your setup (e.g., operating system, versions of R & koRpus)

  2. post the relevant code blocks you are running (i guess it is not related to the particular text you are tagging)

from korpus.

thomasrenkert avatar thomasrenkert commented on August 20, 2024

It works now, but only with the development versions from github and only when installing sylly separately.

library(devtools)
install_github("unDocUMeantIt/sylly", ref="develop")
install_github("unDocUMeantIt/koRpus", ref="develop")
library(koRpus)
install.koRpus.lang(lang=c("en", "de"))
library(koRpus.lang.de)
tagged_corpus <- treetag(
  "corpus.txt",
  treetagger="/opt/treetagger/cmd/tree-tagger-german",
  lang="de"
  )
names_corpus <- query(tagged_corpus, var="wclass", query="name")

from korpus.

unDocUMeantIt avatar unDocUMeantIt commented on August 20, 2024

yes, the development version is the forthcoming 0.13 release which has drastic changes under the hood compared to 0.12, which in turn already was a huge step from 0.11-5 (CRAN). the object classes are totally redesigned and the package depends on minor changes done to sylly, that's why you must use its develop branch as well. usage didn't change so much, it's just the internals.

0.12 was like an interim release, that's why i didn't push it to CRAN but wait for 0.13 to be ready instead. if you encounter any issues, let me know. i think it is rather stable and safe to use already.

from korpus.

unDocUMeantIt avatar unDocUMeantIt commented on August 20, 2024

btw, i'd recommend to try the presets, e.g.

set.kRp.env(
    TT.cmd="manual",
    TT.options=list(
        path="/opt/treetagger",
        preset="de"
    ),
    lang="de"
)
tagged_corpus <- treetag("corpus.txt")

from korpus.

Related Issues (20)

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.