python-goose icon indicating copy to clipboard operation
python-goose copied to clipboard

join sentences with a whitespace

Open ankushshah89 opened this issue 11 years ago • 2 comments

Join the replacetext with a whitespace. Otherwise two different sentence can be mixed. For eg:

url = http://timesofindia.indiatimes.com/tech/tech-news/Facebooks-Mark-Zuckerberg-in-India-today/articleshow/44740431.cms

from goose import Goose g = Goose() a = g.extract(url) a.cleaned_text

u'NEW DELHI: Facebook co-founder Mark Zuckerberg willon Thursday attend the two-day long Internet.org summit that aims to make internet access affordable for people who do not have it globally.Zuckerberg......'

Notice that there is no space between two sentences. This creates problem when later on, we want to split the cleaned_text using some sentence tokenizer.

ankushshah89 avatar Oct 11 '14 18:10 ankushshah89

the test is failing. will look into it and then reopen

ankushshah89 avatar Oct 11 '14 18:10 ankushshah89

only the test_donga_korean is failing. I looked at the expected in the test and even it has the same problem. The expected value doesn't have spaces after "." (period) in some of the sentences. Though, I have no idea about Korean but I guess there should always be space after every ".". So, may be the test case needs to be updated.

ankushshah89 avatar Nov 01 '14 20:11 ankushshah89