Tell me more ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

Some colleagues and I would like to put together a grammar compendium to teach English grammar and would like to record the rules and examples in XML so as to increase the kinds of ways it can be utilized.

As with any XML, much of the work is defining the schema, what to leave out and what to leave in. Here is an example of the kind of XML we are looking to create:

<grammarUnit>
    <title>Present Perfect</title>
    <rules>
        <rule title="Past actions with results/consequences in the present">
            <examples>
                <example answer="has eaten">Paul _____ all the cookies.</example>
                <example answer="has gone">Paul _____ to the basketball game.</example>
            </examples>
        </rule>
    </rules>
</grammarUnit>

Does anyone know of an XML like this that represents grammar rules? (It's hard to search Google for this since XML is itself a kind of grammar which brings up many unwanted hits.)

share|improve this question
7  
It seems like you want to represent exercises about the rules and not the rules themselves, right? In an mostly off-topic note: if you design it yourself, please don't use ____ as the placeholder, use an XLM element instead (which could hold the answer itself). – Joachim Sauer Mar 2 '12 at 6:53
They might be more likely to know over at Linguistics. – Mitch Mar 2 '12 at 14:57

closed as off topic by Mahnax, F'x, FumbleFingers, kiamlaluno, John Lawler Mar 2 '12 at 17:39

Questions on English Language & Usage Stack Exchange are expected to relate to English language and usage within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

2 Answers

You're looking for a scheme for an English treebank. One example would be the Penn treebank, which is not XML but is XML like.

share|improve this answer

Up vote for @Joachim Sauer who makes a good point about whether you're defining the rules themselves or a list of exercises.

If you're considering doing a computing project as a teaching aid, be aware that most of the thinking in computer science around language is now around machine learning, rather than codifying rules a priori.

I know that Google Translate works by machine learning. I think they started with the standard six or so languages that everything at the UN is published in, and used the differing texts to "see" the patterns. The software effectively taught itself how words, clauses, sentences and paragraphs translate. That is very different from some kind of "If then... else..." rule book.

I can't find the relevant post on their blog, but take a look at the first post in the welcome-to-google-translate blog.

Obviously, machine learning needs massive resources of the kind only firms like Google or perhaps a university could muster. You can still have lots of fun writing rules-based language applications, but be aware there will always be too many rules to do anything truly rewarding.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.