Tutorial: NomenclatureQuestionFileFormat

NomenclatureQuestionFileFormat

Nomenclature Question File Format

This information was verified by Dr. Hunt on June 12, 2014 with the following additions(reflected below):

  • There can be more than one correct answer. Correct answers are separated by a |. (verified by RD, Live site alkynes question 6)
  • There can be more than one common wrong answer. Separated by |. (verified by RD, Live site alkynes question 6 and haloalkanes question5)
  • It would be unusual for there to be a file with no @search. (accommodation by RD, assume there may be)

Additions by RD:

  • Type is optional. (verified by RD. Live site polycyclics question4 and RS_stereochemistry question5)
  • @ sometimes appears on a line by itself, other than the last line. (verified by RD. Live site thioethers question10)
  • July 2014, the common section can appear more than once now. That is the file may have multiple common sections. This was done to bring Nomenclature in-line with how Spectroscopy works. Each section can still have multiple common answers separated by |. No changes are needed to the question files that exist.

The format below is the basis for parsing the question file and populating the analyzerBase. The file is broken up into 'sections' which are delimited by the '@' symbol. The order of the sections appears to be consistent between files, however the application doesn't care what order is used. The order appears to be:

  1. @correct
  2. @difficulty
  3. @jme
  4. @type
  5. @loci
  6. @common (this one is formatted differently than the rest :( )
  7. @search (More than one of these sections is possible).
  8. @link
  9. @ (by itself).

Section breakdown: note: Per the tutor.java file the first space character on any given @ line is used to delimit tag from value. Unfortunately, the @common is different. see below.

Within each section lines starting with $ contain a string to use as a hint for an incorrect answer. This is mostly used in the @search sections, but also appears in the @loci section. Space is not used to delimit $ tags from their values.

@correct: always 2 Lines
Line 1: @Correct the-correct-answer-string[|another-acceptable-correct-answer]*
Line 2: message string to show for getting the correct answer

@difficulty: always 2 lines
Line 1: @difficulty difficulty
Line 2: difficulty-value (one of e,m,d,x)

@jme: always 2 Lines
Line 1: @jme jme
Line 2: the-smile-string-for-JME

@type: always 2 lines (optional singleton section)
Line 1: @type type
Line 2: a-string-representing-the-type-name

@loci: always 2 lines
Line 1: @loci number representing the number of loci
Line 2: $The-string-to-show-when-the-number-of-loci-is-incorrect.

@common: always 2 lines (optional section(s))
Line 1: @common-wrong-string common
Line 2: the-string-to-show-if-'common-wrong-string'-is-found

@search: always either 2 or 3 lines.
Line 1: @search Regular-expression-to-search-for
Line 2 option 1: If the line does NOT begin with a $, the-string-to-show-if-the-Regular expression-is-matched.
Line 2 option 2: If the line begins with a $, the-string-to-show-if-the-Regular expression-is-not-matched. (A hint)
Line 3: (appears in cases when Line 2 option 1 is found) $the-string-to-show-if-the-Regular expression-is-not-matched. (A hint)

@link: always 2 lines
Line1: @link help
Line2: the-string-representing-the-URL-to-a-help-page