keeferrourke / pyapa

A Python module for checking APA style. Not a papaya.
https://pypi.python.org/pypi/pyapa/
ISC License
2 stars 1 forks source link

Add more regexes #1

Open keeferrourke opened 7 years ago

keeferrourke commented 7 years ago

Current regexes are inspired from the common errors cited by @JonathanAquino.

ApaStyle.org has a rather extensive FAQ, from which other patterns can likely be derived. The class structure in pyapa.py is very simple, so it should be trivial for new contributors add on to this.

harpunius commented 6 years ago

I might be able to look into this. Did you have any specific patterns in mind?

keeferrourke commented 6 years ago

Unfortunately I'm all too familiar with APA formatting. I've been trying to bother the Psych department at my university to send me a list of common errors which I can build patterns from, but they're not the most responsive.

If you think there's something in the APA style guide which isn't covered by pyapa, I'd welcome a PR with a pattern.

harpunius commented 6 years ago

I found it rather hard to 'translate' the recommendations mentioned in the FAQ, as they seem to be related to how the paper is structured (e.g. very specific requirements to bibliography w.r.t. indentation). I'll keep looking around. In the meantime I wanted to implement the &/and distinction for two authors. I might look at more authors as well.

Hans & Yorke (2006) contradict existing literature (Hans and Yorke, 2006). is incorrect, it should be Hans and Yorke (2006) contradict existing literature (Hans & Yorke, 2006).

I order to fix it, I have to solve #6 first.

keeferrourke commented 6 years ago

Some interesting patterns to implement are mentioned in this blog post: http://blog.apastyle.org/apastyle/2011/02/changes-parentheses-bring.html

Namely, the use of Latin abbreviations within parentheses.