GithubHelp home page GithubHelp logo

Tutorial about crfsuite HOT 16 CLOSED

fahadshery avatar fahadshery commented on May 26, 2024
Tutorial

from crfsuite.

Comments (16)

jwijffels avatar jwijffels commented on May 26, 2024

Please look at the package vignette.

from crfsuite.

fahadshery avatar fahadshery commented on May 26, 2024

I did look at it. I am still not sure how to open the ShinyApp that comes with the package. (Sorry for being thick) and How to create a training dataset. I ran your examples successfully though

from crfsuite.

jwijffels avatar jwijffels commented on May 26, 2024

Open the file in RStudio and press on the run document button in RStudio.

from crfsuite.

fahadshery avatar fahadshery commented on May 26, 2024

I have located the annotations.Rmd installed shiny and flexdashboard packages. But when I click Run -> Run All in RStudio. It gives an error: Error in output$ui_txt <- renderText({ : object 'output' not found

from crfsuite.

jwijffels avatar jwijffels commented on May 26, 2024

I can't reproduce this error. The app runs fine with the following shiny/flexdashboard version

 installed.packages()[c("shiny", "flexdashboard"), "Version"]         
shiny flexdashboard        
"1.0.5"     "0.5.1.1"

from crfsuite.

fahadshery avatar fahadshery commented on May 26, 2024

My versions are:

> installed.packages()[c("shiny", "flexdashboard"), "Version"] shiny flexdashboard "1.1.0" "0.5.1.1" is there a way to install the similar version as yours?

from crfsuite.

fahadshery avatar fahadshery commented on May 26, 2024

installed same version as yours:devtools::install_version("shiny", version = "1.0.5", repos = "http://cran.us.r-project.org") still getting the erro

from crfsuite.

jwijffels avatar jwijffels commented on May 26, 2024

sure, get the package from cran and install it

from crfsuite.

jwijffels avatar jwijffels commented on May 26, 2024

If you can't manage to install the shiny app, you need to have/create training data in the format shown in the help of ?merge.chunkrange

from crfsuite.

fahadshery avatar fahadshery commented on May 26, 2024

It's definitely not working. I installed it on Macbook and Windows and both giving the same error at output$ui_text <- renderText({) object output not found. I always thought Shiny Apps are built with server.R and ui.R? or am I supposed to open up a different file?

from crfsuite.

jwijffels avatar jwijffels commented on May 26, 2024

works fine and tested on Windows/Mac/Linux.
Run as rmarkdown::run(system.file(package = "crfsuite", "app", "annotation.Rmd"))

from crfsuite.

fahadshery avatar fahadshery commented on May 26, 2024

genius! This is why it wasn't working! Now It is up and running! it is time to build custom models... I intend to use your StarSpacy package as well. What's the key difference between the two?

from crfsuite.

fahadshery avatar fahadshery commented on May 26, 2024

I would also suggest to add 2 things in your wiki/intro/ReadMe file:

  1. Add this line in the intro (rmarkdown::run(system.file(package = "crfsuite", "app", "annotation.Rmd"))) if people want to use the app :)
  2. Add confusion matrix instead of table(scores$label) this will show how accurate the model is after training and how good it is performing on the test set. you just have to tweak table(scores$label) to table(train$label,scores$label)
  3. Lastly, for people who can't run the app, just put an example training file. This will help them format their data in the format crfsuite expects. If you can't add an example training_set then just provide a similar format mentioned by openNLP i.e. START:person Mike who is just 10 months old.
  4. He likes to play in the lounge .
  5. Again, thank you for the package. Its truely looking amazing!

from crfsuite.

juliopiubello avatar juliopiubello commented on May 26, 2024

as @fahadshery some more information on how to get the data in the format of crsuites expects would be highly appreciated :)

from crfsuite.

sirhcdlanodcm avatar sirhcdlanodcm commented on May 26, 2024

Just a heads up - there's a small typo in the code to run the shiny app in the vignette:

And run the app with
rmarkdown::run(file = system.file(package = "crfsuite", "app", "annnotation.Rmd"))

Note the 3 n's in "annotation.Rmd". Barely worth mentioning - but for people like me who like to copy and paste without reading, it might be a nice fix ;)

Super excited to explore this package!

from crfsuite.

jwijffels avatar jwijffels commented on May 26, 2024

the crfsuite R package requires you to have a tokenised data.frame (1 row per token, in the right sequence of token occurrence) containing:

  • the category you want to model in IOB format (see the vignette)
  • in the columns, categorical information for each token (e.g. pos tag / is the token capitalised / position of the token in the document / lemma / first 4 letters / last 4 letters / whichever you think is relevant in explaining the category you want to model) as well as information of the surrounding (as in before/after) tokens or surrounding ngrams
  • an identifier of a sequence (e.g. a document identifier)

Full copy-paste reproducible examples (aprroximately 7) of these data structures are provided in

May I ask you to first look there before raising issues.

from crfsuite.

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.