We describe a novel language model for task-dependent out-of-vocabulary (OOV) words. OOV words, such as personal names and place names in a new task can make the language model adaptation difficult. To cope with this problem, we propose a hierarchical, 2-layered language model consisting of inter-word constraints and intra-word constraints. Stochastic properties of OOV words in the two constraints are represented by multi-class modeling and trained as independent Markov models. Occurrence probabilities of an OOV word are expressed by statistics of two Markov Models (namely, doubly Markov model). The proposed model has been tested in a Japanese conversational speech database of appointment making. The word correct rate has been achieved 7.5% improvement from 78.2% to 86.7% when the new language model was used to recognize sentences with OOV words.