With the continuous development of the information technology, ontology has been widely applied to various fields. Ontology has become an advanced technology in artificial intelligence and knowledge engineering, playing an increasingly important role in knowledge representation, knowledge acquisition and ontology application. As the base of ontology applications, ontology construction and ontology automatic extension has become a research hotspot. This paper reviewed the related concepts and methods of ontology construction and extension, proposed an automatic ontology extension method based on supervised learning and text clustering. This method uses the K-means clustering algorithm to separate the domain knowledge, and to guide the creation of training set for Naïve Bayes classifier. Words in candidate set will be added to the target ontology, at the same time, noise words will be added to the stop-word dictionary. The feedback mechanism of this method is designed to promote the architecture of ontology tends to be accurate, and ultimately it will achieve expanding ontology automatically. We use this method to build and expand a ontology in maritime domain. The experiment results show that the ontology expanded automatically using this method is more reasonable and has good application capability.