extract category structure