Code abstract generation method and system based on KNN decoding enhancement

The invention discloses a code abstract generation method and system based on KNN decoding enhancement. The method comprises the following steps: performing vector representation on context semantic information of a code sequence based on an encoder in a code abstract model; decoding the vector base...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: MOON DONG-JIN, LIN HONGFEI, ZHANG FAN
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention discloses a code abstract generation method and system based on KNN decoding enhancement. The method comprises the following steps: performing vector representation on context semantic information of a code sequence based on an encoder in a code abstract model; decoding the vector based on a decoder in the model and outputting a corresponding prediction abstract; meanwhile, an offline database of a storage vector-word data pair obtained based on tagged corpus training is creatively added behind a decoder, so that weighting probability distribution is carried out on output of an original model decoder end and judgment of using a KNN algorithm to refer to the offline database while prediction of each time step of the model is carried out. According to the method, the KNN is added to a probability output distribution function of an original model by using a non-parametric method, and a decoding enhancement effect is achieved on the basis of original output, so that the practicability of the code ab