Can someone provide a line of code that can be used for text summarization in xcode?
Text Summarisation
One line of code ?
That's a machine learning technics.
You should read this:
h ttps://towardsdatascience.com/a-quick-introduction-to-text-summarization-in-machine-learning-3d27ccf18a9f
or
h ttps://medium.com/jatana/unsupervised-text-summarization-using-sentence-embeddings-adb15ce83db1
or
h ttps://blog.floydhub.com/gentle-introduction-to-text-summarization-in-machine-learning/
There are hundreds of similar tutorials on the web…
Thank you for your reply. Those links were helpful.
I don't think it will be one line of code but essentially I am looking for code that can summarize text from a pdf. Could you give an exam of code?
Unfortunately, I have not such example.
But with the tutorials, you should be able to:
- extract text from pdf
Here is a way of doing: https://stackoverflow.com/questions/37240774/how-can-i-get-all-text-from-a-pdf-in-swift
extension String
{
func readPDF() -> String
{
let path = "\(self)"
let url = URL(fileURLWithPath: path)
let pdf = PDFDocument(url: url)
return pdf!.string!
}
}- use the tutorials to build the summary of this text
Good luck, and don't forget to close the thread.