1. An information processing apparatus characterized by comprising: input means for inputting a document having a plurality of input items; discrimination means for discriminating an active input item from the plurality of input items in accordance with a display state of the document; and selection means for selecting a specific grammar corresponding to the active input item discriminated by said discrimination means.