COS_Feature concord_opened_feature_list = NULL;
COS_Feature concord_opened_feature_list_last = NULL;
size_t concord_opened_feature_list_length = 0;
-size_t concord_opened_feature_list_limit = 96;
+size_t concord_opened_feature_list_limit = 640 /* 480 */;
+
+COS_Feature concord_tenure_feature_list = NULL;
+COS_Feature concord_tenure_feature_list_last = NULL;
+size_t concord_tenure_feature_list_length = 0;
COS_Feature_INDEX concord_opened_index_list = NULL;
COS_Feature_INDEX concord_opened_index_list_last = NULL;
strcpy (table->name, feature);
table->value_table = NULL;
table->next = NULL;
+ table->number_of_hits = 0;
+#if 0
+ table->number_of_closes = 0;
+#endif
return table;
}
{
CONCORD_Feature top_feature = concord_opened_feature_list;
- CONCORD_BDB_close (top_feature->db);
- top_feature->db = NULL;
concord_opened_feature_list = top_feature->next;
- top_feature->next = NULL;
+ if ( top_feature->number_of_hits >= 1 )
+ {
+ if ( concord_tenure_feature_list == NULL )
+ {
+ concord_tenure_feature_list = top_feature;
+ concord_tenure_feature_list_last = top_feature;
+ }
+ else
+ {
+ concord_tenure_feature_list_last->next = feature;
+ concord_tenure_feature_list_last = feature;
+ }
+ concord_tenure_feature_list_length++;
+ top_feature->next = NULL;
+#if 0
+ printf ("<<%02d: feature `%s' (%d hits, %d closes) was changed to tenure>>\n",
+ concord_tenure_feature_list_length,
+ top_feature->name,
+ top_feature->number_of_hits,
+ top_feature->number_of_closes);
+#endif
+ }
+ else
+ {
+#if 0
+ if ( (top_feature->number_of_closes >= 2048) &&
+ (top_feature->number_of_hits >= 0) )
+ printf ("{{%02d: close feature `%s' (%d hits, %d closes)}}\n",
+ concord_opened_feature_list_length,
+ top_feature->name,
+ top_feature->number_of_hits,
+ top_feature->number_of_closes);
+#endif
+ CONCORD_BDB_close (top_feature->db);
+ top_feature->db = NULL;
+ top_feature->next = NULL;
+ top_feature->number_of_hits = 0;
+#if 0
+ top_feature->number_of_closes++;
+#endif
+ }
concord_opened_feature_list_length--;
}
feature->db
}
concord_opened_feature_list_length++;
}
+ else
+ {
+ feature->number_of_hits++;
+ }
return 0;
}