Description Usage Arguments Details Examples
StanfordCoreNLP uses a
Properties
class object for the settings to configure the parser. This includes the
number of threads to use, an output directory etc. The properties
function
instantiates this Java object from a properties file or a list
. A set of
auxiliary functions can be used to set and get properties relevant for the
workflow envisaged by this package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
x |
Path of a propeties file or named list of properties. |
p |
A properties object. |
k |
The number of threads used to process files. Needs to be a
reasonable value, but need not be an integer value as value will be coerced
to |
dir |
The output directory for processed data. |
fmt |
The output format to use, a length-one |
The properties()
function will instantiate a properties object
from a (named) list
or a character
vector with the path to a properties
file.
The parse_properties_file()
function instantiates a properties
object from a properties file or a named list.
The number of threads used to process files in parallel is defined
by the property 'threads'. Auxiliary functions properties_get_threads()
and properties_set_threads()
get and set the value.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # Instantiate properties from properties file
props_german <- system.file(
package = "bignlp",
"extdata", "properties_files",
"corenlp-german-fast.properties"
)
plist <- parse_properties_file(props_german)
props <- properties(plist)
# Instantiate properties from list
properties <- list(
"annotators" = "tokenize, ssplit, pos, lemma, ner",
"tokenize.language" = "de",
"pos.model" = "edu/stanford/nlp/models/pos-tagger/german-ud.tagger",
"ner.model" = "edu/stanford/nlp/models/ner/german.distsim.crf.ser.gz",
"ner.applyNumericClassifiers" = "false",
"ner.applyFineGrained" = "false",
"ner.useSUTime" = "false",
"outputFormat" = "json",
"outputDirectory" = "/Users/andreasblaette/Lab/tmp/corenlp/json"
)
props
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.