Open keeferrourke opened 7 years ago
I might be able to look into this. Did you have any specific patterns in mind?
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.
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.
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.
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.