This paper put forward a new word dictionary and query algorithms for network courses an- swering system, learn from the existing three types of sub-word segmentation algorithm of the advan- tages and overcome their shortcomings, the sub一word dictionary consists of two parts which are pro- fessional dictionary and the basic dictionary, the designed algorithm in the word dictionary search, searches firstly for the basic dictionary, searches secondly for the professional dictionaries. ff finds words in the basic dictionary, the algorithm do not continue to search for specialized dictionaries, the algorithm greatly reduces the time complexity. In addition, word dictionary is designed by two-di- mensional index of words and word matrix, and a table of all the ordered sequence of words, word within the code as a subscript in the matrix, the ordered sequence table using a sequential search which could reduce the number of dictionary search.