[web2py] Re: profanity filter

2016-09-02 Thread Alex Glaros
This splitlines() method works better than previous line def clean_bad_words(original_text): bad_words = open(os.path.join(request.folder,'static','bad_words.txt')).readlines() bad_word_is = None for line in bad_words: splitted = line.splitlines() if splitted[0] in

[web2py] Re: profanity filter

2016-09-01 Thread Alex Glaros
thanks Dave, you're right. If you have time, do you see any speed inefficiencies in my code? Trying to improve. for anyone interested, here is extensive bad-word list for many languages: https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words -- Resources: -

[web2py] Re: profanity filter

2016-09-01 Thread Dave S
On Thursday, September 1, 2016 at 3:11:42 PM UTC-7, Alex Glaros wrote: > > thanks Niphlod and Luis. It was always unclear to me how, where, and if > possible, to install packages. So that helps my long-term understanding a > lot. > > For the time being, can anyone please remind me how to

[web2py] Re: profanity filter

2016-09-01 Thread Alex Glaros
thanks Niphlod and Luis. It was always unclear to me how, where, and if possible, to install packages. So that helps my long-term understanding a lot. For the time being, can anyone please remind me how to extract the bad word without braces in controller below? def

[web2py] Re: profanity filter

2016-09-01 Thread Niphlod
definitely the way to go if you can, and I'd also add to learn about virtualenv as soon as you can. for simple packages you may also place their source into site-packages on the web2py root dir (works even with the binaries) Profanity doesn't depend on 3rd party packages, and the source code is

[web2py] Re: profanity filter

2016-09-01 Thread Alex Glaros
okay, I forgot have to use the web2py source distribution to install -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because

[web2py] Re: profanity filter

2016-09-01 Thread Alex Glaros
from the web2py directory in DOS, I tried: pip install C:\alex\language\content\profanity-1.1\profanity but received error: Unknown or unsupported command 'install' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: profanity filter

2016-09-01 Thread Alex Glaros
have not installed anything before in web2py Luis. How to implement in Windos? Instructions say: ##Installation pip install profanity thanks, Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: profanity filter

2016-09-01 Thread luis . valladares
I've found some python packages, maybe it suits your needs: https://pypi.python.org/pypi/profanity/1.1 https://github.com/jared-mess/profanity-filter Or maybe adapting this: https://www.languagetool.org/ El miércoles, 31 de agosto de 2016, 17:34:54 (UTC-4), Alex Glaros escribió: > > anyone have