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

Any plans for writetext? #158

Open
hope-data-science opened this issue Nov 9, 2019 · 2 comments
Open

Any plans for writetext? #158

hope-data-science opened this issue Nov 9, 2019 · 2 comments

Comments

@hope-data-science
Copy link

It's amazing that readtext could read multiple files all at once and import into R environment. Is there a way to write them all into split files? Is it possible to make a writetext function to realize it?

@kbenoit
Copy link
Collaborator

kbenoit commented Nov 11, 2019

Not a bad idea. What format would this take? Would it write one .txt file per document, to a specified output folder? For instance:

writetext(x, path)

where the filenames are from doc_id + txt and the contents from text?

It's already easy to write a .csv from a readtext import, since this is just a slightly special data.frame, and the document-level variables are included.

@hope-data-science
Copy link
Author

I think writetext could serve for those who want to batch clean their text, I think txt and csv both might be important, while doc and docx also has their place. doc_id is a great column to write, but I think user could also specify their own character columns. This would not be hard, but I think those who need writetext might face big data and clean them and save for further analysis.
No idea where it leads to so far, but I think it might help some users. For instance, I may have tons of texts and I find a typo for every text and want to correct it and save it again.

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

2 participants