SpringtideCollectiveOrg / openhousens.ca

Easily track what's said in Nova Scotia's Legislature
http://openhousens.ca/
MIT License
8 stars 4 forks source link

My common words It has only connective words #48

Closed johnfelipe closed 9 years ago

johnfelipe commented 9 years ago

http://concejodemedellin.felipeurrego.com/

How fix it?

jpmckinney commented 9 years ago

Please use the https://github.com/mysociety/sayit or https://github.com/mysociety/sayit.mysociety.org/ issue queues. This is not a repository for general support.

johnfelipe commented 9 years ago

But common words its only yours? common

jpmckinney commented 9 years ago

You need to edit the list of words here to exclude connecting words: https://github.com/SpringtideCollectiveOrg/openhousens.ca/blob/fa23e7aa058d14a8a949713797eb20497c6dd7c1/legislature/views.py#L23

johnfelipe commented 9 years ago

https://gist.github.com/johnfelipe/9b74b8a4f9667ac9ecde

And still show connecting words:

7 6 5 4 3 2 1

jpmckinney commented 9 years ago

Seems to be just those with accents. Try:

from unicodedata import normalize

And replace strip_tags(speech.text).lower() with:

normalize('NFC', strip_tags(speech.text).lower())
johnfelipe commented 9 years ago

https://github.com/johnfelipe/top9ypalabrascomunes/blob/master/speeches/templatetags/speech_extension.py#L10

https://github.com/johnfelipe/top9ypalabrascomunes/blob/master/speeches/templatetags/speech_extension.py#L59

sudo /etc/init.d/gunicorn restart

Still same problem

jpmckinney commented 9 years ago

I'm out of ideas. Good luck!

johnfelipe commented 9 years ago

Hi again, how delete word with ñ and á, é, í, ó, pls help