You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #119 adds the ability to extract noun phrases. Should we allow this list of noun phrases to be applied to a spacy_parsed object to be consolidated the same as entity_consolidate()? Seems like it would make sense, and provide an alternative to entity_consolidate().
We could call this nounphrase_consolidate(). It would provide this workflow:
sp <- spacy_parse() on input text to return a data.frame, classed as spacyr_parsed.
np <- spacy_extract_nounphrases() on the input text to get the noun phrases.
nounphrase_consolidate(x = sp, nounphrases = np) to turn the noun phrases into something that looks like a spacyr_parsed object but with the noun phrase sequences combined in a way similar to the operation of entity_consolidate().
Or: Is there a (more efficient) way to do this in one step, when calling spacy_parse()?
The text was updated successfully, but these errors were encountered:
To have the same functionality as entity_*, nounphrase_consolidate() works independently from nounphrase_extract()`.
To try out, please install the noun-phrase-v2 branch.
There are a few points to do/consider:
tests
we need to make sure that once one of entlity_consolidate() or nounphrase_consolidte() is applied, the other method cannot be applied. My suggestions are:
add another class to the output (entity_consolidated) or
drop the field for the other (e.g. with nounphrase_consolidte() execution, entity field will be removed
I am not sure I have NULL-ified all relevant names used in the function with data.table objects
PR #119 adds the ability to extract noun phrases. Should we allow this list of noun phrases to be applied to a spacy_parsed object to be consolidated the same as
entity_consolidate()
? Seems like it would make sense, and provide an alternative toentity_consolidate()
.We could call this
nounphrase_consolidate()
. It would provide this workflow:sp <- spacy_parse()
on input text to return a data.frame, classed asspacyr_parsed
.np <- spacy_extract_nounphrases()
on the input text to get the noun phrases.nounphrase_consolidate(x = sp, nounphrases = np)
to turn the noun phrases into something that looks like aspacyr_parsed
object but with the noun phrase sequences combined in a way similar to the operation ofentity_consolidate()
.Or: Is there a (more efficient) way to do this in one step, when calling
spacy_parse()
?The text was updated successfully, but these errors were encountered: