start_annotator: Start annotation server

View source: R/live_server.r

start_annotatorR Documentation

Start annotation server

Description

Starts a server and directs to the CSS annotator webclient. You can either run the job in the current R session, or run it in another session. If you run it in the current session (default), you can retrieve the annotations when you close (stop) the server. If you run it in a different session, you can also retrieve the annotations while the server is still running.

Usage

start_annotator(job_db, background = TRUE, browse = TRUE, port = 8000)

Arguments

job_db

A codingjob database file, created with create_job_db

background

If TRUE, start the server as a background process. This way you can keep working in the current session

browse

If TRUE (default), automatically opens annotator_client

port

The port number to run the annotator on.

Details

There are two ways to run in a different session. One is to simply open another R session, and run the server there. The annotations are stored in a SQLite database, and can be retrieved from any R session with the gimme_annotations(db_file) command that is printed when running this function. The other way is to use a rscript_process background process, which runs the server in the background of the current session until the current session is closed. To use this, set background = TRUE (the default).

Value

The job_db (for piping convenience)

Examples

sentiment <- annotation_variable("sentiment", "assign sentiment to words",
  codes = c(red = "Negative", grey = "Neutral", green = "Positive")
)
codingjob <- create_job(
  "Sotu sentiment",
  create_units(mini_sotu, id = "id", set_text("text", text), meta = c("name", "year")),
  create_codebook(sentiment)
)

## Not run: 
job_db <- create_job_db(codingjob)

start_annotator(job_db)

## End(Not run)

ccs-amsterdam/ccsAnnotator documentation built on March 19, 2024, 2:14 a.m.