src/language model based query topic analysis/src/edu/virginia/cs/model/GenerateCoverQuery.java
private int checkSequentialEdited(int previousQuTopic, int currentQuTopic) {
        int parentId = languageModels.get(previousQuTopic).getParent().getTopic_id();
        /**
         * Check if current query topic is the parent of previous query topic,
         * then sequential editing is true.
         */
        if (parentId == currentQuTopic) {
            return 1;
        }
        /**
         * Check if current query topic is the child of previous query topic,
         * then sequential editing is true.
         */
        for (LanguageModel lm : languageModels.get(previousQuTopic).getListOfChildren()) {
            int childTopicId = lm.getTopic_id();
            if (childTopicId == currentQuTopic) {
                return -1;
            }
        }
        /**
         * Current query topic is neither parent nor child of the previous query
         * topic, so return 0.
         */
        return 0;
    }
/**
     * Check if the user query is sequentially edited or not.
     *
     * @param previousQuTopic
     * @param currentQuTopic
     * @return
     */
Check if the user query is sequentially edited or not.
Check if the user query is sequentially edited or not .
private int checkSequentialEdited(int previousQuTopic, int currentQuTopic) {
        int parentId = languageModels.get(previousQuTopic).getParent().getTopic_id();
        /**
         * Check if current query topic is the parent of previous query topic,
         * then sequential editing is true.
         */
        if (parentId == currentQuTopic) {
            return 1;
        }
        /**
         * Check if current query topic is the child of previous query topic,
         * then sequential editing is true.
         */
        for (LanguageModel lm : languageModels.get(previousQuTopic).getListOfChildren()) {
            int childTopicId = lm.getTopic_id();
            if (childTopicId == currentQuTopic) {
                return -1;
            }
        }
        /**
         * Current query topic is neither parent nor child of the previous query
         * topic, so return 0.
         */
        return 0;
    }
private int checkSequentialEdited ( int previousQuTopic , int currentQuTopic ) { int parentId = languageModels . get ( previousQuTopic ) . getParent ( ) . getTopic_id ( ) ; /**
         * Check if current query topic is the parent of previous query topic,
         * then sequential editing is true.
         */ if ( parentId == currentQuTopic ) { return 1 ; } /**
         * Check if current query topic is the child of previous query topic,
         * then sequential editing is true.
         */ for ( LanguageModel lm : languageModels . get ( previousQuTopic ) . getListOfChildren ( ) ) { int childTopicId = lm . getTopic_id ( ) ; if ( childTopicId == currentQuTopic ) { return - 1 ; } } /**
         * Current query topic is neither parent nor child of the previous query
         * topic, so return 0.
         */ return 0 ; }
Check if the user query is sequentially edited or not.
Check if the user query is sequentially edited or not .