In syntactic pattern recognition, the grammatical inference is the process that characterizes a pattern class by a grammar. So establishment of grammatical inference procedure is very important. In this paper, for the purpose of the recognition of hand-written Katakana characters, we suggest a grammatical inference algorithm for context free grammar. Our inference is developed by selecting sample patterns from original set of sample patterns according to a criterion, and classifying the production rules previously.