get-alex / alex Goto Github PK
View Code? Open in Web Editor NEWCatch insensitive, inconsiderate writing
Home Page: https://alexjs.com
License: MIT License
Catch insensitive, inconsiderate writing
Home Page: https://alexjs.com
License: MIT License
I live in the UK.
shows:
Be careful with UK, it’s profane in some cases
Why/when exactly is this profane? And I think even if there is some word I don't know, it is quite likely not written in capital letters as the United Kingdom.
So some case-sensitive checking would be useful here.
Thank you for alex !
Would it be possible to support [Support reStructuredText (http://docutils.sourceforge.net/rst.html) , that would be $FILENAME .rst ?
Great extension, tried it in Atom. I suggest that you add option to click suggested correct words and then have the marked words replaced.
Thank you for this helpful tool 😻
It fails to check files specified using the CLI though, while reading from STDIN works as expected:
bash-3.2$ echo 'Our developers are great guys.' > /tmp/alex.txt
bash-3.2$ alex /tmp/alex.txt
bash-3.2$ cat /tmp/alex.txt | alex
<stdin>
1:26-1:30 warning `guys` may be insensitive, use `people`, `persons`, `folks` instead
⚠ 1 warning
bash-3.2$ node -v
v5.1.0
bash-3.2$ alex --version
1.6.0
consider using 'primary' or 'default'
thank you.
There are some grammar and clarity issues with the README.md. Some of the lines I found very confusing. For example:
alex is also as an AMD, CommonJS, and globals module, uncompressed and compressed
I think you should add "available" to this line. It looks like you missed it completely.
I say we should take some time and proofread our files a bit.
I think would be a good idea to translate it to Spanish
I'm getting some strange characters in the output for single quotes:
Reconsider using “bitch�, it may be profane
Any suggestions?
When I type "homosexual" in the demo alex states:
homosexual may be insensitive, use gay, gay man, lesbian, gay person/people instead
When I type "gay" int the demo alex states:
Don’t use “gay”, it’s profane
When I type "gay person" alex states:
Don’t use “gay”, it’s profane
I don't know what term might seem appropriate in this case, but I think it should not promote the usage of words, which itself identifies as profane.
The easiest way out might be to change the warnings about profanities to something less absolute, like
"gay" may be considered profane
when developers write shell
they almost always mean shell
(/bin/sh). so pls, don't suggest to use they
or it
instead of shell
Currently typing he
on it's own and she
on it's own is detected by the he-she
rule. However the use of he/she
, he or she
and the various other pronoun forms are not detected.
Hey, I know many people use Brackets as a text editor, is there alex for that? If not, that would be great!
Tried the online version. Doesn't pick up the words containing beg.
I may be mistaken, but I think the API for allowing individual profanities may be broken.
For instance, if I add the following to test.js
:
test('alex.text() allow', function (t) {
t.same(alex.text('Hello.').messages.map(String), []); // works fine
t.same(alex.text('A butt.', ['butt']).messages.map(String), []); // fails
});
I'll receive the following when running ava
:
3 passed 1 failed
1. alex.text() allow
t.same(alex.text('A butt.', ['butt']).messages.map(String), [])
| |
| undefined
["1:3-1:7: Don’t use “butt”, it’s profane"]
AssertionError: [ '1:3-1:7: Don’t use “butt”, it’s profane' ] === []
Test.fn (test.js:57:7)
Keeping within the spirit of Alex's rule set; the master
git branch for this repository should be renamed to primary
.
So, spaz
has been a huge part of my vocabulary for a rather long time; having recently been informed it's hurtful, I turned to echo | alex
to see what alternatives might be found. I was surprised to see that alex
assumes the word is being used in its' directly-offensive form (may be insensitive, use \
person with cerebral palsy instead
), instead of as a slang for a hyperactive, or clumsy, or silly person, as it was used where I grew up.
Perhaps some alternatives for that usage could be hunted down and provided as well? (See this really interesting writeup on the linguistic development of this slang in the U.S. vs. the U.K., as an aside.)
(On the same note, mental
and scope
might need to be added as aliases to this.)
The title
Writing up #71, I came across this:
> echo 'crazy' | alex
1:1-1:6 warning `crazy` may be insensitive, use `rude`, `mean`,
`disgusting`, `vile`, `person with symptoms of mental illness`,
`person with mental illness`, `person with symptoms of a mental
disorder`, `person with a mental disorder` instead
So, there's obviously two different uses of crazy
that this is trying to debug: basically-casual-slur, and actual-reference-to-ill-person. Even lumping together these possibilities is … mildly hurtful; and in cases like this, I suspect it'd also be helpful to make it clear to those not already in the know, that saying “He was acting like a person with mental illness!” is not magically less-offensive than “He was acting crazy!”; suggesting all of those replacements wholesale is … less than ideal, I think?
If I'm not the only one that feels that way, here's my thought: it'd be helpful if replacements could be broken down into sections or ‘senses’, each with a short descriptive phrase of what the usage that might be replaced with one of of replacements:
> echo 'crazy' | alex
1:1-1:6 warning `crazy` may be insensitive. in context: referring
to a difficult person or their unusual actions, use [`rude`, `mean`,
`disgusting`, or `vile`] instead; in context: referring to a person
afflicted by an actual illness, use [`person with symptoms of mental
illness`, `person with mental illness`, `person with symptoms of a
mental disorder`, or `person with a mental disorder`] instead
(That output could probably be further prettified, but I was assuming you'd want to keep each warning on a single line?)
Thoughts?
I'm sure there's many more, I'll report back with my findings.
Quoted "...as a transgender teenager living in..."
Matches "a transgender", not "a transgender teenager".
For output only errors.
Delirious is a word that is often used improperly like crazy.
Or it would be hard for me to survive https://www.reddit.com/r/programming/comments/25y6yt/use_the_unofficial_bash_strict_mode_unless_you/ when using alex to check my files.
Browserify is being used to combine several source files into alex.js
, why not provide these source files along the bundle? It would make contributions and code analysis much easier. Cheers.
We were adding haskell linter support for coala (https://github.com/coala-analyzer/coala) and found that there was a clash with another package named alex
in ghc (haskell).
It seems we need alex
from haskell as a dependency for our build - and this clash is a little annoying, as we can only use one of these packages at a time.
Is it possible to make an alias of your alex to alex.js
or alexjs
? So that we can simply run alexjs
to run your package and alex
for the other ?
I'm sure it'd help with https://github.com/wooorm/alex/issues/58 too as CIs (Travis and circleci) seem to have this haskell's alex installed already.
TRIGGER WARNING: profane and derogatory words are ahead
I see that both "gyp" and "gypsy" are considered profane, as they are derogatory to Romani people.
However, as a Jew, I find it troubling that alexjs does not see a problem "jew" and "jewed". For example, "I overpaid by $20, he guy totally jewed me." Or, "that guy is such a jew."
In this case, the replacement suggests should be "that individual totally ripped me off
" and "that individual is such a frugal-minded person
"
Given that lots of documentation is written in Restructured Text(ReST), it would be good if Alex supported this 'natively'.
Code blocks in ReST are already indented, and inline code is wrapped in ''s. However other parts of ReST are also enclosed in '
's, such as links which should also be linted.
I would like to suggest a reverse mode to make this project even more useful.
With reverse mode for example instead of suggesting:
"he" may be insensitive, use "they", "it" instead
The tool would suggest:
"they" may be imprecise, use "he", "she" instead
This would probably be easy to implement as it requires little more than swapping the words.
homosexual
:
homosexual may be insensitive, use gay, gay man, lesbian, gay person/people instead
lesbian
:
Don’t use lesbian, it’s profane
A tab or 3 or more spaces at the beginning will cause nothing to be checked
Also, nothing inside quotes is checked either.
If "Jesus" is considered profane, why is "Muhammed" absolutely fine? Why the discrimination?
Islamist is casually thrown around now, and even if not used in a derogatory sense, as a Muslim, I do feel like their is generally negative connotation surrounding the word. I think the news has helped push the word to it's current nonchalantness.
Their is a relatively recent effort by CAIR to scrub the word from the media: http://www.clarionproject.org/analysis/cair-makes-new-push-get-media-scrub-word-islamist
Even if the word isn't considered profane, I think providing a quick bio to it's potential offensiveness would be great!
Possible solution: test if the rest of the word is “browser”, then don’t mark as insensitive.
Alex v4.0.1
sane is the inverse of "insane" and is thus ableist in many contexts
Where I am, spa
is used instead of spaz
. I saw it come up in a document today (that I plan on running through Alex, however the program will miss this regional slang). Going by a few relevant mentions on Urban Dictionary, this only happens in Ireland, but it is pretty much the only form of the word used here, and is very offensive.
Input:
hell
OR input:
he'll
Output:
hell may be insensitive, use they, it instead
Don’t use “hell”, it’s profane
OR output:
he'll may be insensitive, use they, it instead
Don’t use “he'll”, it’s profane
I think hell and he'll are probably different words.
TRIGGER WARNING: words that are often mistaken as profanity ahead, as well as references to profane words
Currently, alexjs considers "niggardly" to be "profane".
Although niggardly should always be avoided due to its homophonous relationship to that disgustingly offensive “n-word”, my concern is that a writer with a profound vocabulary who's looking to find the perfect balance between “miserly” and “Scrooge-esque” would take offense to his writing being classified as "profane".
Please change the category to "often mistaken as profanity".
suggest a sleeveless undershirt
Alex only supports english, right?
I want to help to make this work with texts in spanish, but don't know where to start.
Hijacking is considered profane by Alex. However...
Continuing #102 (comment)
Shows no warning:
<!-- ioo -->
From: Devon, UK
Shows warning:
From: Devon, UK
Hey, this is a really cool thing! I spent a good 10 minutes looking for the list of rules to figure out if this library would be the best fit for my use case, and finally found a link to retext-equality in an old issue.
I'm not sure where you'd want it in the README or how you'd want the link phrased, but it would be really helpful!
I noticed that alex has covered some offensive terms such as "tranny" but has failed to include some equally offensive ones such as these.
Input:
echo "That person is a he-she." | alex
returns no issues found
Input:
echo "That person is a shemale." | alex
also returns no issues found
Probably related with https://github.com/wooorm/mdast/issues/90 .
Alex gives no output when using with stdin. Just installed with npm install --global alex
and executed the example from your help page.
lasse@eduroam-1483 ~/prog/coala (git)-[sils/tests] % echo "His network looks good" | alex
lasse@eduroam-1483 ~/prog/coala (git)-[sils/tests] %
alex flags any usage of the word "Chinese" as profane.
I don't think it is, but there is always the chance that I'm wrong.
If it isn't, it is probably best to remove "Chinese" from the profanity list.
One you start doing this issue https://github.com/wooorm/alex/issues/49 it would be nice to allow ignoring whole directories.
I'm looking for the actual list that alex matches against. I can't find it in the repository in the master branch. I searched for some words like “master” and could only find them in example.md, readme.md and test.js. Could it be that this essential part of the source code is actually missing from the repository?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.