This paper presents a rule based approach to extraction of dialog acts and topics from utterances in a spoken dialog system with a task-independent dialog controller based on an extension of the frame-driven method. We demonstrated it could control dialogs in several different task domains, only given a set of topic frames and a set of rules manually designed for the discourse analysis which were both task-dependent. In this paper we report an approach to semiautomatic derivation of a set of rules for the discourse analysis from information needed to specify a task, for example, a set of topic frames, a conceptual tree of those words and case frames of those verbs which are likely to be used in the task domain. This method was examined with a corpus of twenty dialogs. Correct extraction rates were 82% for the topic and 80% for the dialog act.