Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An example of direct_quotations #200

Open
ghost opened this issue Jun 12, 2018 · 1 comment
Open

An example of direct_quotations #200

ghost opened this issue Jun 12, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 12, 2018

Hello,
I am trying to use this function but it seems that it does not consider these kind of examples:

from textacy import extract as ex
doc=nlp(" Kurds are pitted against Kurds , Iraqis against Kurds , Turks against Kurds -- and the American planes just circle overhead without intervening , " the minister said)
ex.direct_quotations(doc)

Is there any example to show how this function works?

thanks

@danieljue
Copy link

Hi, I just discovered this feature and tried to use it too. With some additional string formatting I got this to work:

from textacy import extract as ex
doc=nlp(" \"Kurds are pitted against Kurds , Iraqis against Kurds , Turks against Kurds -- and the American planes just circle overhead without intervening , \" the minister said")
a=ex.direct_quotations(doc)
for item in a: print (item)

(minister, said, "Kurds are pitted against Kurds , Iraqis against Kurds , Turks against Kurds -- and the American planes just circle overhead without intervening , ")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant