Comments (8)
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.
Hi, thanks for your quick reply!
I get the error
Invalid var for class kRp.tagged: tag
from korpus.
which version of koRpus are you using? there were bugs in query()
fixed in 0.12-1.
from korpus.
I've tested it with the latest CRAN version and also with the development version from github. The error persists.
from korpus.
that's odd, i can't reproduce the issue. could you please
-
give some environmental data on your setup (e.g., operating system, versions of R & koRpus)
-
post the relevant code blocks you are running (i guess it is not related to the particular text you are tagging)
from korpus.
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.
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.
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)
- Missing tags for Danish HOT 6
- incomplete import of LCC corpus HOT 7
- Error: Specified directory cannot be found: ~/bin/treetagger/bin HOT 4
- URLs and sequences of punctuation in documents cause some readability measures to fail HOT 1
- Issue on Windows HOT 1
- Error in path.expand(path) : argument 'path' incorrect HOT 24
- Error: english-lexicon.txt not found HOT 3
- Working in Python? HOT 1
- option lexicon HOT 6
- Treetagger do not worh in both koRpus and teststem packages HOT 1
- Incorrect calculation of MTLD? HOT 3
- readability() returns error message HOT 9
- treetegger working with a dataset in R HOT 6
- Error in reading corpus database HOT 5
- Can I use the udpipe annotated results? HOT 2
- character vector "measure" seems to be ignored by lex.div; Fehler in x[["end"]] : Indizierung außerhalb der Grenzen; Fehler in 1:lastValidIndex : Resultat wäre zu langer Vektor HOT 2
- Getting "Awww, this should not happen" error even though the sys.tt.call runs sucessfully HOT 6
- TT.tokenizer not found HOT 3
- Flesch Formula multiplier HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from korpus.