2010/1/6 sago <idmilling...@googlemail.com>: >> If you present some research to >> demonstrate how this tag could/would work for non-English languages, >> it would be a lot more compelling. > > That's not going to work, in any meaningful sense. That peculiarity of > the article is highly English-specific. The generalization would > surely be something like > > {% if /some-regex/.matches(word) %}{{ form1 }} {{ word }}{% else %} > {{ form2 }} {{ word }}{% endif %}
Disclaimer: I have a masters degree in Computational Linguistics. Ths is a simplified account of "last year of bachelor"-stuff: Human language cannot (mathematically proven) be modelled by a mere regexp, as human language is not only context-free, (needing a full parser) but context-sensitive (needing parsers we don't really have yet). Nice, yes? It cannot go in humanize but it could go in localflavor for English. It would be necessary with a stemmer and a replaceable wordlist though, as what words get "an" and what get "a" not only depends on country but also on specific publishing styles - and all of this has a tendency to change over time. HM
-- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.