In the extensive monitoring of maritime traffic, maritime management frequently encounters incomplete automatic identification system (AIS) data, particularly in critical static fields like vessel types. This shortfall presents substantial challenges in safety management, necessitating robust methods for data completion. Distinct from road traffic, where road width imposes constraints, maritime vessels of identical classifications often choose significantly divergent routes, deviating by several nautical miles. Sole dependence on trajectory clustering is insufficient. Addressing this issue, we segments the maritime area into spatiotemporal grids, transforming vessel paths into sequences of grid encodings. Utilizing natural language processing techniques, we integrate the Word2vec word embedding approach with our novel biLSTM self-attention chunk-max pooling net (biSAMNet) model, enhancing the classification of vessel trajectories. This method is crucial for determining static details like vessel types. Employing the Taiwan Strait as a case study and benchmarking against CNN, RNN, and methods based on the attention mechanism, our findings underscore our model’s superiority. The biSAMNet achieves an impressive vessel classification F1 score of 0.94, using only 5-dimensional word embeddings, highlighting the effectiveness of Word2vec pre-trained embedding layers. This research introduces a novel paradigm for processing vessel trajectory data, greatly enhancing the accuracy of filling in incomplete vessel type details.