get-functions | R Documentation |
A collection of get methods for spacyr return objects (of spacy_out
class).
get_tokens(spacy_out)
get_tags(spacy_out, tagset = c("google", "detailed"))
get_attrs(spacy_out, attr_name, deal_utf8 = FALSE)
get_named_entities(spacy_out)
get_dependency(spacy_out)
get_noun_phrases(spacy_out)
get_ntokens(spacy_out)
get_ntokens_by_sent(spacy_out)
spacy_out |
a spacy_out object |
tagset |
character label for the tagset to use, either |
attr_name |
name of spaCy token attributes to extract |
get_tokens
returns a data.frame of tokens from spaCy.
get_tags
returns a tokenized text object with part-of-speech tags.
Options exist for using either the Google or Detailed tagsets. See
https://spacy.io.
get_attrs
returns a list of attributes from spaCy output
get_named_entities
returns a list of named entities in texts
get_dependency
returns a data.frame of dependency relations.
get_noun_phrases
returns a data.frame of noun phrases.
get_ntokens
returns a data.frame of dependency relations
get_ntokens_by_sent
returns a data.frame of dependency
relations, by sentence
## Not run:
# get_tags examples
txt <- c(text1 = "This is the first sentence.\nHere is the second sentence.",
text2 = "This is the second document.")
results <- spacy_parse(txt)
tokens <- tokens(results)
tokens_with_tag <- tokens_tag(tokens)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.