Cross-language word alignment method and device based on evolutionary learning and generative adversarial network, and medium

By employing evolutionary learning and generative adversarial networks, this method utilizes unsupervised information for cross-linguistic word alignment, addressing the reliance on bilingual dictionaries in existing technologies. This achieves high-precision and stable word alignment results and improves upon the phenomenon of incomplete isomorphism.

CN115759056BActive Publication Date: 2026-06-12SOUTH CHINA UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTH CHINA UNIV OF TECH
Filing Date
2022-11-21
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing cross-linguistic word alignment methods rely on bilingual dictionaries, which fail to effectively mine unsupervised information, suffer from gradient vanishing and pattern collapse problems, and cannot effectively handle non-perfect isomorphism.

Method used

By employing evolutionary learning and generative adversarial networks, and through adversarial training of bidirectional mappers and discriminators, combined with Procrustes closed-form solutions and local mappings, a high-quality bilingual alignment dictionary is generated. Unsupervised information is used for training to improve word alignment accuracy and stability.

🎯Benefits of technology

It achieves high-precision unsupervised word alignment, solves the problems of gradient vanishing and pattern collapse, improves the phenomenon of incomplete isomorphism, and generates a high-quality bilingual alignment dictionary.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115759056B_ABST
    Figure CN115759056B_ABST
Patent Text Reader

Abstract

The application discloses a cross-language word alignment method and device based on evolutionary learning and a generative adversarial network and a medium. The method comprises the following steps: obtaining word vector tables of a source language and a target language and processing the word vector tables; integrating an evolutionary learning framework into the training of the generative adversarial network, training the network by using the processed word vector tables, generating an initialized bilingual alignment dictionary, performing Procrustes closed-form solution on the initialized bilingual alignment dictionary and the obtained word vector tables, obtaining a reinforced generator, and then generating a bilingual alignment dictionary; iteratively performing Procrustes closed-form solution and generating a bilingual alignment dictionary, and finally outputting a bidirectional mapping word vector table; performing point-level local movement on the bidirectional mapping word vector table according to the offset vector information of the nearest neighbor in the output bilingual alignment dictionary, regenerating a bilingual alignment dictionary; and iteratively updating the bilingual alignment dictionary until the number of iterations is reached. The method has the advantages of high alignment accuracy, effective improvement of bilingual isomorphism, and independence from any bilingual dictionary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer natural language processing, and specifically relates to a cross-language word alignment method, apparatus, system, terminal device and storage medium based on evolutionary learning and generative adversarial networks. Background Technology

[0002] Cross-linguistic word alignment is a crucial part of machine translation, aiming to provide vocabulary-level alignment by establishing correspondences between each word in the source language and words in the target language. Currently, most methods in this field are supervised, requiring the support of bilingual dictionaries or parallel corpora, and training is based on generative adversarial networks.

[0003] These cross-linguistic word alignment methods rely on annotated bilingual dictionaries or parallel corpora, neglecting the extraction of a large amount of unsupervised information contained in the corpora themselves. Furthermore, they fail to optimize for inherent problems in generative adversarial networks, such as vanishing gradients and pattern collapse, resulting in unstable performance during training and low accuracy in the training results. In addition, most of these methods rely on global mapping based on the overall isomorphism between cross-linguistic word embedding spaces, which can lead to a situation where the overall structure is not completely isomorphic, but local structures are. Existing methods have proposed local mapping to improve this problem, but they use bilingual alignment dictionaries as guidance, making them supervised methods.

[0004] Therefore, there is a need for an unsupervised method that improves upon the shortcomings of existing generative adversarial network-based methods, mitigates the bilingual non-isomorphic phenomenon, and eliminates the dependence on bilingual dictionaries. Summary of the Invention

[0005] To address the shortcomings of the existing technologies, this invention provides a cross-lingual word alignment method, apparatus, system, terminal device, and storage medium based on evolutionary learning and generative adversarial networks. This method has the advantages of stable training, high word alignment accuracy, effective improvement of bilingual isomorphism, and no reliance on any bilingual dictionary or parallel corpus, thus fully mining unsupervised information.

[0006] The first objective of this invention is to provide a cross-linguistic word alignment method based on evolutionary learning and generative adversarial networks.

[0007] A second objective of this invention is to provide a cross-linguistic word alignment device based on evolutionary learning and generative adversarial networks.

[0008] The third objective of this invention is to provide a cross-linguistic word alignment system based on evolutionary learning and generative adversarial networks.

[0009] The fourth objective of this invention is to provide a terminal device.

[0010] The fifth object of the present invention is to provide a storage medium.

[0011] The first objective of this invention can be achieved by adopting the following technical solution:

[0012] A cross-linguistic word alignment method based on evolutionary learning and generative adversarial networks, the method comprising:

[0013] Using an existing word corpus, obtain word vector tables for the source language and the target language, and process the two word vector tables.

[0014] An evolutionary learning framework is incorporated into the training of a generative adversarial network (GAN). Two processed word vector tables are used as inputs to perform adversarial training on the generator and discriminator in the GAN. The trained generator is then used to generate an initial bilingual aligned dictionary. The generator is a bidirectional mapper, and there are two discriminators.

[0015] The initial bilingual alignment dictionary and the two obtained word vector tables are subjected to Procrustes closed-form solution to obtain an enhanced generator, and the bilingual alignment dictionary is regenerated based on the enhanced generator; the Procrustes closed-form solution and bilingual alignment dictionary are iteratively performed to obtain a higher quality generator and bilingual alignment dictionary until convergence, at which point training is stopped and the bilingual alignment dictionary and bidirectional mapping word vector table are output.

[0016] The output bilingual aligned dictionary is used as the initial training dictionary. The output bidirectional mapped word vector table is then moved locally at the point level according to the offset vector information of the nearest neighbor in the training dictionary to obtain the overall non-linear mapping result of the bilingual word vector space. The bilingual aligned dictionary is then regenerated based on the mapping result. The bidirectional mapped word vector and the bilingual aligned dictionary are iteratively updated until the specified number of iterations is reached to obtain the bilingual aligned dictionary.

[0017] Furthermore, during adversarial training, for each generator training iteration, multiple mutated generators are trained based on various designed optimization objectives as mutation directions. The mutated generators are then evaluated, and only the K best mutated generators are retained for use in the next training iteration. After multiple iterations, the generative adversarial network corresponding to the best unsupervised metric is retained as the trained generative adversarial network.

[0018] Furthermore, the two mappers are G and F, where G is the mapper from the source language to the target language space, and F is the reverse mapper of G.

[0019] During adversarial training, to address the inconsistency issue in word alignment tasks, a loss constraint based on cyclic consistency is added, specifically including:

[0020] The source language word vector x is processed by G to obtain the word vector G(x), and then G(x) is reverse-mapped back to the source language space through F to obtain F(G(x)); the distance between the source language word vector x and F(G(x)) is constrained;

[0021] It is symmetric and also constrains the distance between the target language word vector y and G(F(y)).

[0022] Furthermore, during adversarial training, in order to constrain the mapping range of the mapper, a self-mapping loss is added, specifically including:

[0023] For any input data y′ in G, G maps the input data to the target language word vector space Y, where the input data itself is a target language word vector; similarly, F maps the input data x′ to the source language word vector space X, where the input data itself is a source language word vector.

[0024] The above process is accomplished by constraining the distance between G(y′) and y′, and the distance between F(x′) and x′.

[0025] Furthermore, the mean cosine distance between the word vector spaces of the source and target languages ​​is used as an unsupervised metric, with the largest mean cosine distance being the best unsupervised metric.

[0026] Furthermore, the step of generating an initial bilingual aligned dictionary using the trained generator includes:

[0027] The bidirectional mapper in the trained generative adversarial network maps word vectors from the source language space to the target language space.

[0028] Find the target language word vector that has the closest cosine distance to the mapped source language word vector in the target space as the alignment word, and together they form a word pair in the form of <source language word, target language word>.

[0029] Furthermore, the processing of the two acquired word vector tables includes:

[0030] The two word vector tables were cleaned.

[0031] Preprocessing operations are performed on the cleaned data, including:

[0032] Divide the word vectors by their L2 norm, and calculate the average of all word vectors based on the resulting vectors.

[0033] The updated word vectors are obtained by subtracting the average value from each word vector.

[0034] The updated word vectors are then divided by their L2 norm to obtain the preprocessed word vectors.

[0035] The second objective of this invention can be achieved by adopting the following technical solution:

[0036] A cross-linguistic word alignment device based on evolutionary learning and generative adversarial networks, the device comprising:

[0037] The word vector table acquisition module is used to acquire word vector tables of the source language and the target language using the existing word corpus, and to process the two acquired word vector tables.

[0038] An adversarial training module is used to incorporate an evolutionary learning framework into the training of a generative adversarial network. It uses two processed word vector tables to perform adversarial training on the generator and discriminator in the generative adversarial network, and uses the trained generator to generate an initial bilingual aligned dictionary; wherein, the generator is a bidirectional mapper, and there are two discriminators;

[0039] The generator enhancement module is used to perform Procrustes closed-form solution on the initialized bilingual alignment dictionary and the two obtained word vector tables to obtain an enhanced generator, and regenerate the bilingual alignment dictionary based on the enhanced generator; iteratively performing Procrustes closed-form solution and generating bilingual alignment dictionary, gradually obtaining a higher quality generator and bilingual alignment dictionary until convergence, at which point training stops and the bilingual alignment dictionary and bidirectional mapping word vector table are output;

[0040] The local mapping bilingual alignment dictionary generation module is used to take the output bilingual alignment dictionary as the initial training dictionary, and make the output bidirectional mapping word vector table perform point-level local shifts based on the nearest neighbor offset vector information in the training dictionary to obtain the overall non-linear mapping result of the bilingual word vector space. The bilingual alignment dictionary is regenerated based on the mapping result. The bidirectional mapping word vectors and bilingual alignment dictionary are iteratively updated until the specified number of iterations are reached to obtain the bilingual alignment dictionary.

[0041] The third objective of this invention can be achieved by adopting the following technical solution:

[0042] A cross-lingual word alignment system based on evolutionary learning and generative adversarial networks is disclosed. The system includes a front-end page and a back-end service. The front-end page is used to select a search language and input query words / sentences, and displays a spatial distribution image of the query words and top-K search words mapped by the top-K search results sent by the back-end service. The back-end service obtains the top-K search results by searching a bilingual alignment dictionary obtained by the cross-lingual word alignment method described above, based on the received selected search language and input query words / sentences.

[0043] The fourth object of the present invention can be achieved by adopting the following technical solution:

[0044] A terminal device includes a processor and a memory for storing programs executable by the processor. When the processor executes the programs stored in the memory, the above cross-language word alignment method is implemented.

[0045] The fifth object of the present invention can be achieved by adopting the following technical solution:

[0046] A storage medium stores a program, which when executed by a processor, implements the above cross-language word alignment method.

[0047] The present invention has the following beneficial effects compared with the prior art:

[0048] 1. The method provided by the present invention is based on the adversarial training of evolutionary learning and generative adversarial networks, and optimizes the problems of mode collapse, gradient disappearance, and unstable training existing in the existing unsupervised GAN-based methods for the word alignment task. An mapper that maps the source language to the target language space and maps the target language space to the source language space is learned in an evolutionary manner.

[0049] 2. The method provided by the present invention adopts bidirectional mapping to improve the non-uniformity problem in the word alignment task. For example, the Chinese word "羊" is mapped to the English-aligned word "sheep", but in the context of mapping from English to Chinese, "sheep" is aligned to "牛", resulting in a non-uniformity problem, and mapping constraints need to be performed to improve the performance of word alignment.

[0050] 3. The method provided by the present invention uses unsupervised information to generate a bidirectional high-quality dictionary, and obtains the overall non-linear mapping result of the bilingual word vector space through local mapping, so as to improve the problems brought by the non-isomorphism between the source language and the target language in the cross-language word alignment task. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the structures shown in these drawings without creative efforts.

[0052] Figure 1 It is a flowchart of the cross-language word alignment method based on evolutionary learning and generative adversarial network in Embodiment 1 of the present invention.

[0053] Figure 2This is a schematic diagram of the cross-language word alignment method based on evolutionary learning and generative adversarial networks according to Embodiment 1 of the present invention.

[0054] Figure 3 This is a structural diagram of the model that integrates evolutionary learning and bidirectional generative adversarial networks in Embodiment 1 of the present invention.

[0055] Figure 4 This is a structural diagram of the structural model for generating a bidirectional high-quality dictionary using unsupervised local mapping in Embodiment 1 of the present invention.

[0056] Figure 5 This is an architectural design diagram of the cross-language word alignment system based on evolutionary learning and generative adversarial networks according to Embodiment 1 of the present invention.

[0057] Figure 6 This is the page for searching and aligning words in the cross-language word alignment system of Embodiment 1 of the present invention.

[0058] Figure 7 This is a flowchart of the word retrieval and alignment function of the cross-language word alignment system in Embodiment 1 of the present invention.

[0059] Figure 8 This is the retrieval result visualization page of the cross-language word alignment system in Embodiment 1 of the present invention.

[0060] Figure 9 This is a flowchart illustrating the retrieval result visualization function of the cross-language word alignment system in Embodiment 1 of the present invention.

[0061] Figure 10 This is a structural block diagram of the cross-language word alignment device based on evolutionary learning and generative adversarial networks according to Embodiment 2 of the present invention.

[0062] Figure 11 This is a structural block diagram of the terminal device according to Embodiment 3 of the present invention. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. It should be understood that the specific embodiments described are merely used to explain this application and are not intended to limit this application.

[0064] Example 1:

[0065] like Figure 1 , 2As shown, this embodiment provides a cross-linguistic word alignment method based on evolutionary learning and generative adversarial networks, including the following steps:

[0066] S101. Using the existing word corpus, obtain the word vector tables of the source language and the target language, and process them.

[0067] (1) Using the existing word corpus, obtain the word vector table of the source language and the word vector table of the target language.

[0068] Using existing word corpora, obtain the word list and word vector table of the source language, as well as the word list and word vector table of the target language;

[0069] The vocabulary and word vectors used in this embodiment were trained on Wikipedia using the Fasttext word embedding training method and served as input to the network model of this invention. The word vector dimension is 300. For languages ​​with letters, the vocabulary is stored in lowercase. In particular, for words in the vocabulary that may have multiple word vectors (i.e., many-to-one), only the most frequent word vector in the statistics is actually retained. Therefore, each word in the vocabulary corresponds to only one specific word vector instance (i.e., one-to-one), stored in dictionary (key-value) format.

[0070] (2) Process the word vectors of the source language and the word vectors of the target language.

[0071] The obtained word vectors are cleaned to filter out low-frequency words and retain high-frequency words.

[0072] In this embodiment, only the top 200,000 most frequently used words from the vocabulary dictionary are selected as the model. Simultaneously, the word vectors undergo standardization preprocessing.

[0073] The preprocessing operation specifically includes: dividing the L2 norm of each word vector by its own, calculating the average value of all word vectors based on the result of the operation, subtracting the average value from each word vector to obtain the updated word vector, and finally dividing the L2 norm of each word vector by its own.

[0074] S102. An evolutionary learning framework is incorporated into the training process of the generative adversarial network. The two processed word vector tables are used to initialize the training of the generative adversarial network. The generator in the trained generative adversarial network is used to generate an initial bilingual aligned dictionary.

[0075] This embodiment addresses the inconsistency issue in word alignment tasks by employing a bidirectional mapping generative adversarial network. For example... Figure 3As shown, a bidirectional generative adversarial network contains a bidirectional generator (mapper) defined as G and F. G is the mapper from the source language (language X) to the target language space (language Y), symbolically represented as G:X→Y, while F is the reverse mapper, symbolically represented as F:Y→X. It also contains a bidirectional discriminator D_A and D_B, which respectively determine whether the input word embedding truly comes from the source language or the target language space.

[0076] Both mappers in this embodiment are linear matrices with a dimension of 300*300. Both discriminators are multilayer perceptrons with two hidden layers, each with a dimension of 2048. A dropout value of 0.1 is set for each hidden layer, and Leaky-ReLU is used as the activation function. The output layer of the discriminator is a sigmoid binary classification.

[0077] To address the inconsistency problem, a loss constraint for cycle consistency is introduced, defined as L. cycle Specifically, the source language word vector x is mapped by G to obtain the word vector G(x). Then, this word vector is mapped back to the source language space X by a mapper F to obtain F(G(x)), thereby constraining the distance between the source language word vector x and F(G(x)). Symmetrically, the distance between the target language word vector y and G(F(y)) is also constrained.

[0078] In addition, to better constrain the mapping range of the generator, a self-mapping loss, defined as L, is added. id In other words, for any input, generator G maps the input data to the target language word vector space Y, and similarly, generator F maps the input data to the target language word vector space X. Specifically, constraints are imposed on the distance between F(x) and x, and similarly on the distance between G(y) and y. This example uses L1 distance as the distance metric for both constraints; a smaller value indicates a smaller loss and better model training performance.

[0079] This embodiment addresses the problems of pattern collapse, gradient vanishing, and training instability that easily occur during the training of generative adversarial networks (GANs). It incorporates an evolutionary learning framework into the GAN structure, employing different adversarial training objectives as mutation behaviors. Figure 3 The "mutation" operation in the model involves each individual (candidate generator) being upgraded based on these mutations. After obtaining mutated offspring, an evaluation function is used to assess the quality and diversity indicators of all mutated offspring. Figure 3 The "evaluation operation" finally selects the top K scorers from these mutated offspring and retains them as the generator for the next round of training. Figure 3 The "select" operation.

[0080] The word vectors processed in step S101 are used as input to the Generative Adversarial Network (GAN) for adversarial training between the generator and discriminator. Specifically, the generator and discriminator are trained alternately and challenged against each other to encourage the generator to produce data that approximates the training data distribution. The generator is responsible for creating fake data using noise, while the discriminator is responsible for distinguishing real data from generated data. The alternation frequency is such that the generator is trained once after every three discriminator training iterations. For each generator training iteration, multiple mutated generators are trained using various designed optimization objectives as mutation directions. These generators are evaluated, and only the K mutated generators with the best performance are retained for the next training iteration, ensuring both high quality and diversity of the generators.

[0081] Based on the characteristics of model training, the model's performance initially improves and then declines during training. Therefore, multiple iterations are needed to retain the word alignment model with the best unsupervised model selection metric as the model output. Specifically, this embodiment uses the mean cosine distance between the word vector spaces of the source and target languages ​​as the unsupervised metric for model training. A higher value indicates better performance, and the model with the highest value will be retained, marking the end of the generative adversarial network training process and obtaining a preliminarily trained mapper.

[0082] Based on the best-preserved generative adversarial network model, the generator within it is used to generate an initial bilingual alignment dictionary. Specifically, this involves: mapping word vectors from the source language space to the target language space using the model's generator; finding the target language word vector whose cosine distance from the mapped source language word vector in that space is the closest, and using these as alignment words to form word pairs in the form of <source language word, target language word>, thus completing the construction of the bilingual alignment dictionary for use as input in subsequent steps.

[0083] S103. Using the obtained word vector table and the initialized bilingual alignment dictionary as a high-quality initial word vector dictionary, perform Procrustes closed-form solution to obtain the enhanced generator, and regenerate the bilingual alignment dictionary based on the enhanced generator.

[0084] Using the bilingual alignment dictionary and the word vector table obtained in step S101, a Procrustes closed-form solution is performed to strengthen the bidirectional mappers G and F in step S102. In the context of mapping from the source language to the target language, the strengthened mappers map the word vectors in the source language space to the target language space. The target language word vector with the closest cosine distance to the mapped source language word vector in that space is selected as the alignment word, forming word pairs in the form of <source language word, target language word>. This completes the construction of the bilingual alignment dictionary and regenerates it. Similarly, the bilingual alignment dictionary in the context of mapping from the target language to the source language is obtained.

[0085] S104. Iteratively perform the closed-form solution of Procrustes and generate a bilingual aligned dictionary to gradually obtain a higher quality generator and bilingual aligned dictionary. After multiple iterations, output the final generator, bilingual aligned dictionary and bidirectional mapped word vector table.

[0086] Iteratively solve Procrustes closed-form problems and generate bilingual aligned dictionaries to gradually obtain higher quality generators and bilingual aligned dictionaries. After multiple iterations, output the final reinforced generators G and F, the bilingual aligned dictionaries, and the bidirectional mapped word vector table.

[0087] Repeat step S103, iteratively performing the Procrustes closed-form solution and dictionary generation operations to gradually obtain a higher quality bilingual mapper and alignment dictionary. The output bilingual alignment dictionary serves as the input for the next iteration. This process is repeated multiple times until convergence. At this point, training stops, and the final reinforcement generators G and F, the bilingual alignment dictionary, and the bilingual mapped word vector table are output. The bilingual mapped word vectors are the word vector representation X′ mapped from the source language word vector X to the target language space, and the word vector Y of the target language mapped to the source language space, Y′.

[0088] S105. The bidirectional mapping word vector table is moved locally at the point level according to the nearest neighbor offset vector information in the output bilingual aligned dictionary to obtain the overall non-linear mapping result of the bilingual word vector space. The bilingual aligned dictionary is regenerated according to the mapping result.

[0089] Using the bilingual aligned dictionary output from step S104 as the initial training dictionary, the bidirectional mapping word vector table is moved locally at the point level according to the nearest neighbor offset vector information in the training dictionary to obtain the overall nonlinear mapping result of the bilingual word vector space. The bilingual aligned dictionary is then regenerated based on the mapping result.

[0090] like Figure 4 As shown, the bilingual alignment dictionary obtained in step S104 is used as the initial training dictionary, corresponding to the larger point blocks surrounded by dashed circles in the Xspace or Yspace of the figure. There is a certain offset distance between the vector representations of aligned words in the training dictionary, which needs to be further reduced. The bidirectional mapping word vector table is driven to perform point-level local movement based on the offset vector information of the nearest neighbor in the training dictionary, corresponding to the different dashed circles in the figure moving in the direction of the arrow. This results in an overall nonlinear mapping result of the bilingual word vector space, which improves the problem caused by the non-complete isomorphism between the source language and the target language in the cross-language word alignment task. Based on the mapping result, a higher-performance bilingual alignment dictionary and bidirectional mapping word vector table are regenerated.

[0091] S106. Iteratively update the bidirectional mapping word vectors and generate a bilingual aligned dictionary until the specified number of iterations is reached, resulting in a bilingual aligned dictionary for all words.

[0092] Obtaining the bilingual aligned dictionary for all words in this step completes the overall training of the entire model.

[0093] Repeat step S105 to iteratively update the bidirectional mapping word vector table and generate a bilingual alignment dictionary until a specified number of iterations are reached. Based on the final bidirectional mapping word vector table, retrieve the nearest neighbor words of all words in the target language space as the final cross-language word alignment result.

[0094] like Figure 5 As shown, this embodiment also provides a cross-language word alignment system based on evolutionary learning and generative adversarial networks, which adopts a four-layer architecture design: First, the DAO layer is responsible for direct interaction with the physical database MySQL and provides an interface for operating the database; second, the Service layer performs business logic processing by calling the DAO layer interface; third, the Controller layer interacts with the front-end web page through the lightweight framework Flask, receives user requests, and determines the response content; finally, the View layer loads the received data onto the page and displays it to the user.

[0095] This cross-language word alignment system mainly provides two functions: word retrieval and word alignment function, and search result visualization function.

[0096] For the search alignment function, users first select the search language and enter query terms (sentences) on the page. The system then performs a database query based on the input term information, obtaining the nearest neighbor (top 1) of the mapped vector of the query term in the target language space as the corresponding search term. The results are then returned to the page for the user to view. Specifically, such as... Figure 6 As shown, users need to select their source and target languages ​​in advance, such as "en" (English) for the source and "Hr" (Croatian) or "ru" (Russian) for the target. After entering the word (or phrase) to query in the input box, the user clicks the submit button to send the request to the backend. The backend retrieves the corresponding search terms from the database based on the input. The input word is the one that can be retrieved and is returned; otherwise, the input word is returned directly. Because the trained model primarily aligns English words with other languages, such as "en-hr" and "en-ru," it does not handle alignment with non-English words. If a user requests a "ru-hr" word alignment search, the system will first perform a "ru-en" search, and then perform an "en-hr" search based on the retrieved English words. In other words, "en" acts as the intermediary language. The overall process is as follows: Figure 7 As shown.

[0097] For the search results visualization function, users select a search language and enter query terms on the page. The system then retrieves the top 10 nearest neighbors of the mapped vector in the target language space. Principal Component Analysis (PCA) is performed on the set of points formed by this mapped vector and its nearest neighbors to reduce the vector dimension to two dimensions. The result is then plotted using Python's 2D plotting library, matplotlib, and displayed on the page for user viewing. Specifically, the search results visualization function is implemented based on the search alignment term function, and the initial steps are the same, such as... Figure 8 As shown, users need to select their source and target languages ​​in advance, such as "en" (English) for the source and "Hr" (Croatian) or "ru" (Russian) for the target. However, unlike English, users can only enter a single word in the input box and click the submit button to send the request to the backend. The backend then retrieves the search terms, obtains the top K search results, and plots the spatial distribution of the mapped query terms and top K search terms, returning this data to the frontend. The specific process is as follows: Figure 9 As shown.

[0098] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware, and the corresponding program can be stored in a computer-readable storage medium.

[0099] It should be noted that although the method operations of the above embodiments are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the order of execution of the described steps may be changed. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0100] Example 2:

[0101] like Figure 10 As shown, this embodiment provides a cross-lingual word alignment device based on evolutionary learning and generative adversarial networks. The device includes a word vector table acquisition module 1001, an adversarial training module 1002, a generator reinforcement module 1003, and a local mapping bilingual alignment dictionary generation module 1004, wherein:

[0102] The word vector table acquisition module 1001 is used to acquire the word vector table of the source language and the word vector table of the target language using the existing word corpus, and to process the two acquired word vector tables.

[0103] The adversarial training module 1002 is used to incorporate an evolutionary learning framework into the training of the generative adversarial network. It uses two processed word vector tables to perform adversarial training on the generator and discriminator in the generative adversarial network, and uses the trained generator to generate an initial bilingual aligned dictionary; wherein, the generator is a bidirectional mapper, and there are two discriminators;

[0104] The generator enhancement module 1003 is used to perform Procrustes closed-form solution on the initialized bilingual alignment dictionary and the two obtained word vector tables to obtain an enhanced generator, and regenerate the bilingual alignment dictionary based on the enhanced generator; iteratively performing Procrustes closed-form solution and generating bilingual alignment dictionary, gradually obtaining a higher quality generator and bilingual alignment dictionary until convergence, at which point training stops and the bilingual alignment dictionary and bidirectional mapping word vector table are output;

[0105] The local mapping bilingual alignment dictionary generation module 1004 is used to take the output bilingual alignment dictionary as the initial training dictionary, and make the output bidirectional mapping word vector table perform point-level local shifts based on the nearest neighbor offset vector information in the training dictionary to obtain the overall non-linear mapping result of the bilingual word vector space. The bilingual alignment dictionary is regenerated based on the mapping result. The bidirectional mapping word vectors and bilingual alignment dictionary are iteratively updated until a specified number of iterations are completed to obtain the bilingual alignment dictionary.

[0106] The specific implementation of each module in this embodiment can be found in Embodiment 1 above, and will not be repeated here. It should be noted that the system provided in this embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure can be divided into different functional modules to complete all or part of the functions described above.

[0107] Example 3:

[0108] This embodiment provides a terminal device, which can be a computer, such as... Figure 11 As shown, the processor 1102, memory, input device 1103, display 1104, and network interface 1105 are connected via system bus 1101. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium 1106 and internal memory 1107. The non-volatile storage medium 1106 stores the operating system, computer programs, and database. The internal memory 1107 provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. When the processor 1102 executes the computer programs stored in the memory, it implements the cross-language word alignment method of Embodiment 1 described above, as follows:

[0109] Using an existing word corpus, obtain word vector tables for the source language and the target language, and process the two word vector tables.

[0110] An evolutionary learning framework is incorporated into the training of a generative adversarial network (GAN). The generator and discriminator in the GAN are trained adversarially using two processed word vector tables. The trained generator is then used to generate an initial bilingual aligned dictionary. The generator is a bidirectional mapper, and there are two discriminators.

[0111] The initial bilingual alignment dictionary and the two obtained word vector tables are subjected to Procrustes closed-form solution to obtain an enhanced generator, and the bilingual alignment dictionary is regenerated based on the enhanced generator; the Procrustes closed-form solution and bilingual alignment dictionary are iteratively performed to obtain a higher quality generator and bilingual alignment dictionary until convergence, at which point training is stopped and the bilingual alignment dictionary and bidirectional mapping word vector table are output.

[0112] The output bilingual aligned dictionary is used as the initial training dictionary. The output bidirectional mapped word vector table is then moved locally at the point level according to the offset vector information of the nearest neighbor in the training dictionary to obtain the overall non-linear mapping result of the bilingual word vector space. The bilingual aligned dictionary is then regenerated based on the mapping result. The bidirectional mapped word vector and the bilingual aligned dictionary are iteratively updated until the specified number of iterations is reached to obtain the bilingual aligned dictionary.

[0113] Example 4:

[0114] This embodiment provides a storage medium, which is a computer-readable storage medium, storing a computer program. When the computer program is executed by a processor, it implements the cross-language word alignment method of Embodiment 1 above, as follows:

[0115] Using an existing word corpus, obtain word vector tables for the source language and the target language, and process the two word vector tables.

[0116] An evolutionary learning framework is incorporated into the training of a generative adversarial network (GAN). The generator and discriminator in the GAN are trained adversarially using two processed word vector tables. The trained generator is then used to generate an initial bilingual aligned dictionary. The generator is a bidirectional mapper, and there are two discriminators.

[0117] The initial bilingual alignment dictionary and the two obtained word vector tables are subjected to Procrustes closed-form solution to obtain an enhanced generator, and the bilingual alignment dictionary is regenerated based on the enhanced generator; the Procrustes closed-form solution and bilingual alignment dictionary are iteratively performed to obtain a higher quality generator and bilingual alignment dictionary until convergence, at which point training is stopped and the bilingual alignment dictionary and bidirectional mapping word vector table are output.

[0118] The output bilingual aligned dictionary is used as the initial training dictionary. The output bidirectional mapped word vector table is then moved locally at the point level according to the offset vector information of the nearest neighbor in the training dictionary to obtain the overall non-linear mapping result of the bilingual word vector space. The bilingual aligned dictionary is then regenerated based on the mapping result. The bidirectional mapped word vector and the bilingual aligned dictionary are iteratively updated until the specified number of iterations is reached to obtain the bilingual aligned dictionary.

[0119] It should be noted that the computer-readable storage medium in this embodiment can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0120] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope disclosed in the present invention, based on the technical solution and inventive concept of the present invention, shall fall within the scope of protection of the present invention.

Claims

1. A cross-linguistic word alignment method based on evolutionary learning and generative adversarial networks, characterized in that, The method includes: Using an existing word corpus, obtain word vector tables for the source language and the target language, and process the two word vector tables. An evolutionary learning framework is incorporated into the training of a generative adversarial network (GAN). Two processed word vector tables are used as inputs to perform adversarial training on the generator and discriminator in the GAN. The trained generator is then used to generate an initial bilingual aligned dictionary. The generator is a bidirectional mapper, and there are two discriminators. The initial bilingual alignment dictionary and the two obtained word vector tables are subjected to Procrustes closed-form solution to obtain an enhanced generator, and the bilingual alignment dictionary is regenerated based on the enhanced generator; the Procrustes closed-form solution and bilingual alignment dictionary are iteratively performed to obtain a higher quality generator and bilingual alignment dictionary until convergence, at which point training is stopped and the bilingual alignment dictionary and bidirectional mapping word vector table are output. The output bilingual aligned dictionary is used as the initial training dictionary. The output bidirectional mapped word vector table is then moved locally at the point level according to the offset vector information of the nearest neighbor in the training dictionary to obtain the overall non-linear mapping result of the bilingual word vector space. The bilingual aligned dictionary is then regenerated based on the mapping result. The bidirectional mapped word vector and the bilingual aligned dictionary are iteratively updated until the specified number of iterations is reached to obtain the bilingual aligned dictionary.

2. The cross-linguistic word alignment method according to claim 1, characterized in that, During adversarial training, for each generator training iteration, multiple mutated generators are trained based on various designed optimization objectives as mutation directions. The mutated generators are then evaluated, and only the K best mutated generators are retained for use in the next training iteration. After multiple iterations, the generative adversarial network corresponding to the best unsupervised metric is retained as the trained generative adversarial network.

3. The cross-linguistic word alignment method according to claim 2, characterized in that, The two mappers are G and F. G is the mapper from the source language to the target language space, and F is the reverse mapper of G. During adversarial training, to address the inconsistency issue in word alignment tasks, a loss constraint based on cyclic consistency is incorporated, specifically including: The source language word vector x is processed by G to obtain the word vector G(x), and then G(x) is reverse-mapped back to the source language space through F to obtain F(G(x)); the distance between the source language word vector x and F(G(x)) is constrained; It is symmetric and also constrains the distance between the target language word vector y and G(F(y)).

4. The cross-language word alignment method according to claim 3, characterized in that, In adversarial training, to constrain the mapping range of the mapper, a self-mapping loss is added, specifically including: For any input data y′ in G, G maps the input data to the target language word vector space Y, where the input data itself is a target language word vector; similarly, F maps the input data x′ to the source language word vector space X, where the input data itself is a source language word vector. The above process is accomplished by constraining the distance between G(y′) and y′, and the distance between F(x′) and x′.

5. The cross-linguistic word alignment method according to claim 2, characterized in that, The mean cosine distance between the word vector spaces of the source and target languages ​​is used as the unsupervised metric, with the largest mean cosine distance being the best unsupervised metric.

6. The cross-linguistic word alignment method according to claim 1, characterized in that, The step of generating an initial bilingual aligned dictionary using the trained generator includes: The bidirectional mapper in the trained generative adversarial network maps word vectors from the source language space to the target language space. Find the target language word vector that has the closest cosine distance to the mapped source language word vector in the target space as the alignment word, and together they form a word pair in the form of <source language word, target language word>.

7. The cross-linguistic word alignment method according to any one of claims 1 to 6, characterized in that, The processing of the two obtained word vector tables includes: The two word vector tables were cleaned. Preprocessing operations are performed on the cleaned data, including: Divide the word vectors by their L2 norm, and calculate the average of all word vectors based on the resulting vectors. The updated word vectors are obtained by subtracting the average value from each word vector. The updated word vectors are then divided by their L2 norm to obtain the preprocessed word vectors.

8. A cross-linguistic word alignment device based on evolutionary learning and generative adversarial networks, characterized in that, The device includes: The word vector table acquisition module is used to acquire word vector tables of the source language and the target language using the existing word corpus, and to process the two acquired word vector tables. An adversarial training module is used to incorporate an evolutionary learning framework into the training of a generative adversarial network. It uses two processed word vector tables to perform adversarial training on the generator and discriminator in the generative adversarial network, and uses the trained generator to generate an initial bilingual aligned dictionary; wherein, the generator is a bidirectional mapper, and there are two discriminators; The generator enhancement module is used to perform Procrustes closed-form solution on the initialized bilingual alignment dictionary and the two obtained word vector tables to obtain an enhanced generator, and regenerate the bilingual alignment dictionary based on the enhanced generator; iteratively performing Procrustes closed-form solution and generating bilingual alignment dictionary, gradually obtaining a higher quality generator and bilingual alignment dictionary until convergence, at which point training stops and the bilingual alignment dictionary and bidirectional mapping word vector table are output; The local mapping bilingual alignment dictionary generation module is used to take the output bilingual alignment dictionary as the initial training dictionary, and make the output bidirectional mapping word vector table perform point-level local shifts based on the nearest neighbor offset vector information in the training dictionary to obtain the overall non-linear mapping result of the bilingual word vector space. The bilingual alignment dictionary is regenerated based on the mapping result. The bidirectional mapping word vectors and bilingual alignment dictionary are iteratively updated until the specified number of iterations are reached to obtain the bilingual alignment dictionary.

9. A cross-linguistic word alignment system based on evolutionary learning and generative adversarial networks, characterized in that, The system includes a front-end page and a back-end service. The front-end page is used to select a search language and input query terms / phrases, and to display a spatial distribution image of the query terms and topK search terms mapped by the topK search results sent by the back-end service. The back-end service obtains the topK search results by searching the bilingual alignment dictionary obtained by the cross-language word alignment method according to any one of claims 1-7, based on the received selected search language and input query terms / phrases.

10. A storage medium storing a program, characterized in that, When the program is executed by the processor, it implements the cross-language word alignment method according to any one of claims 1-7.