A method of tracking the context in man-machine communication is propo
sed. The ''tracking the context'' is defined as locating the place of
context switching and dividing the user's command sequence into chunks
, each of which corresponds to one work. For tracking the context, ''a
syntactic-context'' is introduced. A syntactic-context is a working s
et of words in the command lines a user enters. To locate the place of
the syntactic-context switching, word-kind ratio and window contribut
ion are defined. It is shown that the hit rate of command prediction i
s improved by using these indicators, which shows the effectiveness of
the proposed method.