categories.rb revision 8cb567484bd71d34b7f6fe36ecf5b84398fa579f
5806683c1c3f5b1997e92a023c0fe39912d4df5dTimo Sirainen # Delete previous set of categories
5806683c1c3f5b1997e92a023c0fe39912d4df5dTimo Sirainen [ Category.all, CEdge.all ].flatten.each { |c| c.destroy }
5806683c1c3f5b1997e92a023c0fe39912d4df5dTimo Sirainen classes = self.entities.select { |e| e.kind == 'Class' }
5806683c1c3f5b1997e92a023c0fe39912d4df5dTimo Sirainen subclasses = self.sentences.select { |e| e.text.include?('SubClassOf')}
5806683c1c3f5b1997e92a023c0fe39912d4df5dTimo Sirainen Category.create!(:name => c.display_name || c.name)