---
title: "A Pilot Study of Text-to-SQL Semantic Parsing for Vietnamese"
description: "How a Vietnamese version of Spider tests text-to-SQL on unseen databases and how word segmentation, schema linking and pretraining…"
canonical: "https://research.elamur.ai/free/en/papers/nguyen-2020-pilot-study-text-sql-semantic/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/nguyen-2020-pilot-study-text-sql-semantic/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / A Pilot Study of Text-to-SQL Semantic Parsing for Vietnamese

# A Pilot Study of Text-to-SQL Semantic Parsing for Vietnamese

Paper · 2020 · Anh Tuan Nguyen, Mai Hoang Dao and Dat Quoc Nguyen

**Authors:** [Anh Tuan Nguyen](https://md.research.elamur.ai/free/en/authors/anh-tuan-nguyen/), [Mai Hoang Dao](https://md.research.elamur.ai/free/en/authors/mai-hoang-dao/) and [Dat Quoc Nguyen](https://md.research.elamur.ai/free/en/authors/dat-quoc-nguyen/) · **Year:** 2020 · **Venue:** Findings of the Association for Computational Linguistics: EMNLP 2020 · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[**50** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W3091857408) · [Cited by **27** papers in our library of the 163,136 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/nguyen-2020-pilot-study-text-sql-semantic/cited-by/) · [Findings of the Association for Computational Linguistics: EMNLP 2020](https://aclanthology.org/volumes/2020.findings-emnlp/) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2020.findings-emnlp.364/)
- [PDF](https://aclanthology.org/2020.findings-emnlp.364.pdf)
- [DOI 10.18653/v1/2020.findings-emnlp.364](https://doi.org/10.18653/v1/2020.findings-emnlp.364)
- [OpenAlex](https://openalex.org/W3091857408)

Citations: OpenAlex, 2026-10-14.

## Summary

A person can ask a database how many cars have more than 4 cylinders without knowing where the cylinder counts are stored. A text-to-SQL parser has to turn that question into a query that identifies the right table and column, applies the comparison, and counts the qualifying rows. The authors study this kind of [semantic parsing](https://md.research.elamur.ai/free/en/concepts/semantic-parsing/) for Vietnamese. Their starting point is a gap in the available research data. English had benchmarks for training and evaluating parsers on complex questions across databases, while earlier Vietnamese studies had largely worked with rules or simpler questions.

The authors create a Vietnamese benchmark from the publicly available portion of [Spider](https://md.research.elamur.ai/free/en/papers/yu-2018-spider-large-scale-human-labeled/). They translate the questions, the names of database tables and columns, and the values used in the SQL queries. The resulting dataset contains 9691 questions paired with 5263 SQL queries across 166 databases. The training, development, and test sets contain different databases, so a parser must apply what it learns to schemas it has never encountered during training. The authors release the dataset as ViText2SQL.

The experiments adapt two existing parsers, EditSQL and IRNet, and compare several ways of preparing the input. In written Vietnamese, a space can separate syllables within a word. Automatically joining those syllables into words improves both parsers in the basic human-translated setting. Features taken from a Vietnamese dependency parser improve both again. For IRNet, the authors also introduce a statistical way to connect a value in the question with the database column that could hold it. Removing this extension lowers exact matching accuracy on both the development and test sets. Baseline runs using human-translated questions also score higher than the corresponding runs using machine-translated questions.

The largest improvements come from contextual pretraining. For each parser, the Vietnamese-specific [PhoBERT](https://md.research.elamur.ai/free/en/papers/nguyen-2020-phobert-pre-trained-language-models/) configuration delivers higher overall scores than the multilingual XLM-R configuration. IRNet with PhoBERT reaches 60.2 on development and 53.2 on test in exact matching accuracy, the percentage of questions for which the predicted SQL matches the reference under the benchmark’s comparison. The authors’ English IRNet run reaches 55.3 on the same database split, with a different pretrained encoder. The Vietnamese error analysis helps explain what exact matching measures. Some failures select an incorrect column or operation, while others express the intended query through a different SQL construction. The results establish a starting point for measuring Vietnamese text-to-SQL and show how much the input representation and the choice of evaluation criterion matter.

## Deep dive: A Pilot Study of Text-to-SQL Semantic Parsing for Vietnamese

How a Vietnamese version of Spider tests text-to-SQL on unseen databases and how word segmentation, schema linking and pretraining affect accuracy. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### From a question to a database operation

Semantic parsing turns a natural-language expression into a structured representation of its meaning. In this study the expression is a question, and the target representation is a SQL query. That makes the task both linguistic and technical. The system has to understand what the user wants to know and express it using the names, relationships, and operations available in a particular relational database. The authors place this work in the context of [question answering](https://md.research.elamur.ai/free/en/topics/question-answering/) and task-oriented [dialogue systems](https://md.research.elamur.ai/free/en/topics/dialogue-systems/), where an intermediate query can determine which information the system retrieves.

Consider the car example. The quantity requested is a count of cars, while the number in the question describes an eligibility condition on cylinder counts. A query that returns cylinder counts for all cars has found a relevant column but has misunderstood the requested output. A query that counts all cars has understood the output but omitted the condition. Even a short question requires the parser to assign different jobs to different expressions. It must decide what to return, where to look, and which rows qualify.

A database schema gives the names of the tables and their columns. A table organizes records of a particular kind, and a column holds a particular attribute or category of information. The schema available to the parser depends on which database it is querying. A word such as “name” can describe the name of a song, a singer, or a country, and a database can offer several plausible columns. The parser has to resolve the question in the context of that schema. A database with several related tables also requires decisions about which tables to combine and how to connect them.

The paper treats SQL as a common output representation across input languages. When an English question and its Vietnamese counterpart ask for the same thing, they can require the same sequence of database operations. Translating the schema changes the vocabulary the parser must recognize and reproduce, while leaving operations such as counting, filtering, and grouping available in SQL. That combination makes it possible to investigate the language side of the task while preserving the broad structure of a familiar benchmark.

#### Why the benchmark changes the task

The authors describe English-language datasets as an important reason for the development of text-to-SQL parsers. WikiSQL and Spider provided examples of questions paired with queries, allowing a parser to learn from examples and be tested against references. The paper cites the earlier work on [Seq2SQL](https://md.research.elamur.ai/free/en/papers/zhong-2017-seq2sql-generating-structured-queries-natural/) in its discussion of WikiSQL. Spider adds challenges that are central to the Vietnamese pilot study. Its questions require more complex SQL, and its evaluation asks parsers to generalize to databases absent from training.

Holding out databases makes a difference even when the syntax of the target language is familiar. A parser may learn during training that a phrase calls for a count, or that a request for the oldest person requires comparing ages. At test time it still has to locate the attribute that supports the operation in a new schema. A parser that relies on previously encountered table and column names has less support under this design. An unfamiliar name can be meaningful to a human reader while remaining hard for the parser to associate with the appropriate phrase in the question.

The difficulty increases when a question combines operations. A request about countries with a minimum number of manufacturers requires the system to understand what is being counted, how the count is associated with each country, and which countries are eligible. It also has to make the database connections needed to reach the relevant records. The source benchmark gives the study examples where competence with individual SQL clauses can be examined alongside competence with assembling them.

The paper describes a smaller body of prior work on Vietnamese. Several earlier approaches used rule templates that mapped individual database-oriented questions to structured meanings. Another study treated Vietnamese text-to-SQL as a labeling problem. A conditional random field, or CRF, used handcrafted features to assign labels to parts of a question so that the labeled parts could fill slots in a query. The pilot study explains that this approach dealt with questions whose structure was simple enough for slot filling. The authors found no previous Vietnamese work using sequence-to-sequence parsers for this task.

Data availability was a separate constraint. The authors mention a resource of 5460 sentences for [semantic role labeling](https://md.research.elamur.ai/free/en/concepts/semantic-role-labeling/), an annotation task that identifies the roles played by expressions in a sentence. They also describe an earlier Vietnamese text-to-SQL dataset of 1258 questions over 3 databases. They report that neither resource was publicly available for research. A public, cross-database benchmark would make it possible to study Vietnamese questions with more varied SQL and give researchers a common basis for comparing experimental choices.

#### Why spaces matter in Vietnamese

Written Vietnamese gives the authors a concrete question about the units a parser should read. A space can mark a boundary between words or separate syllables within a word. The paper cites an estimate that about 85% of Vietnamese word types contain at least two syllables. Splitting a sentence at every space therefore leaves many words distributed across several input units. A parser can potentially learn to combine those units from context. Automatic [word segmentation](https://md.research.elamur.ai/free/en/topics/tokenization/) makes the proposed boundaries explicit before the parser sees the sentence.

The paper illustrates the distinction with a question about how many countries are in Europe. Its 8 syllable units form 5 words when the expressions for “how many,” “country,” and “Europe” are each joined internally. The difference is especially relevant to schema linking, the step that connects language in the question to database elements. If a column name and an expression in the question refer to the same concept, representing that expression consistently can make the correspondence easier to recognize. An automatic segmenter can also make mistakes, so the question is empirical. The authors compare the two levels of representation on the same benchmark.

### The method, step by step

#### Translating a question, its schema, and its reference query

The project starts with an English question and the SQL paired with it. The authors translate the question so that it asks for the same information in Vietnamese. They also translate table and column names and the values that appear in queries. Those changes must agree. A translated question about a country or continent needs a reference query with the intended Vietnamese value, and a reference to a translated column needs to remain attached to the corresponding part of the schema.

The English car question illustrates what carries over. In the Vietnamese version, the question still asks for a count of cars with more than 4 cylinders. The query still counts rows after filtering by a cylinder attribute. The identifiers for the car data and cylinder count are translated. The comparison remains strict, so a row with a cylinder count equal to the stated threshold does not qualify. Because the target operation stays fixed, this example can test whether a parser recovers the operation when the question and database labels are expressed in Vietnamese.

The country example in the paper shows the same process for a longer query. The question asks which European countries have at least 3 car manufacturers. The displayed SQL combines country, continent, and manufacturer information. It restricts the records to Europe, groups the matching records by country name, and applies a condition to each group’s count. The requested result is a country name. Grouping determines the unit for the count, while the threshold determines which groups appear in the result. The Vietnamese translation preserves those roles while translating the identifiers and the continent value.

Two computer science students and a researcher carried out the translation and review. A student translated the material associated with a database. The other student checked those translations and made corrections. The researcher examined the initial and corrected versions and revised them where needed. Working with all the material for a database together gives the translators a way to maintain consistent names in the questions, schemas, and SQL that refer to it.

The authors followed the English wording when a literal translation worked. For more difficult questions, they consulted the SQL and expressed its meaning in more natural Vietnamese. That decision matters when the English question compresses several relationships into a short phrase. The SQL can clarify which records are paired, what the question asks to return, and when a count or condition is applied. Using the reference query as a guide gives the translators a way to preserve those distinctions while changing the sentence’s wording.

The authors split the material by database. The parsers learn from question–query pairs in the training set, checkpoint selection uses the development set, and the final scores come from the test set. The original translations use syllable-level spacing. The authors then run RDRSegmenter, a component of VnCoreNLP, to produce a version in which the syllables of a multi-syllable word are grouped. The paired versions preserve the benchmark questions and intended SQL, making input segmentation a configurable experimental choice.

From the translated dataset to SQL predictions The steps in order.

#### How the two parsers construct a query

Both baselines use an encoder–decoder architecture. The encoder builds numerical representations of the inputs, including the question and information about the available schema. The decoder uses those representations to make the decisions that produce a query. The study adopts existing implementations and changes parts of the Vietnamese input and schema-linking process. That makes the experimental comparison about how those changes interact with two established designs, each with a different route to SQL.

[EditSQL](https://md.research.elamur.ai/free/en/papers/zhang-2019-editing-based-sql-query-generation/) was designed for context-dependent questions, where an exchange can contain a series of related requests. It has an encoder for the question and table schema and a separate encoder that can use recent questions from the interaction. A decoder with access to the table information produces the SQL. The original architecture’s support for question history is part of its design. The Vietnamese benchmark supplies individual question–query examples, so the paper’s results concern performance on those examples.

The question-and-table encoder uses a bidirectional long short-term memory network, abbreviated BiLSTM. It reads a sequence in both directions so that the representation at a position can incorporate material on either side. The interaction encoder is also bidirectional and uses attention, a mechanism that lets the system give different weights to available representations. The decoder uses an LSTM and attention to produce the output while taking account of the encoders’ representations. For the reader following the comparison, the important distinction is that EditSQL generates the SQL from these encoded inputs.

IRNet first establishes links between the question and the schema. A basic operation is to compare groups of neighboring input units with names of columns and tables. These groups are [n-grams](https://md.research.elamur.ai/free/en/concepts/n-gram/), so a match can involve a sequence such as a multi-part column name. Name matching gives the encoder evidence that a particular database element is relevant to the question. That evidence can be especially helpful when an unfamiliar database offers many columns and only a few belong in the answer.

IRNet encodes the question with a BiLSTM and uses an attention-based encoder for the schema. It feeds these representations, along with the schema-linking information, to a grammar-based decoder. The decoder constructs a tree in a representation called SemQL, which captures decisions about the query in an intermediate form. The paper connects the grammar-based decoder to earlier work on [syntactic code generation](https://md.research.elamur.ai/free/en/papers/yin-2017-syntactic-neural-model-general-purpose/). A grammar provides rules for how the pieces of an output can fit together.

A deterministic conversion then applies database and SQL knowledge to produce the final query from SemQL. Given a particular intermediate representation and the relevant schema, this conversion follows fixed rules. The learned part has to recover decisions such as the requested operation and the database elements it concerns. The conversion supplies their corresponding SQL form. The two baselines thus provide different settings in which to ask whether better input units or richer input representations make the final query more accurate.

#### Linking a mentioned value to a column

A question can mention a value without giving the name of the column that would contain it. The continent example illustrates the distinction. The question names Europe, while the SQL has to compare that value against an appropriate column. Recognizing the string as a value is one part of the task. Associating that value with a database attribute is another. Direct overlap with a column label can establish some associations, but a value such as a place name can be informative even when the label uses a different expression.

In the original IRNet setup described by the authors, this kind of linking draws on ConceptNet, a [knowledge graph](https://md.research.elamur.ai/free/en/concepts/knowledge-graph/). IRNet uses relations that express categories and related terms to associate a mentioned value with a column. The categories it uses were unavailable for Vietnamese. The authors replace that source of evidence with a statistic they can estimate from Vietnamese text, normalized pointwise mutual information, or NPMI.

NPMI measures the strength of association between expressions through their occurrence in a corpus. The intuition is that a pair can be informative when its expressions tend to occur together relative to how common they are individually. Common expressions will have opportunities to appear near many other expressions, so simple proximity counts give an incomplete picture. The authors use the association scores to rank candidate column names for a value mentioned in the question. The rank supplies linking evidence to IRNet. The decoder still has to decide how to use the linked material in its query.

The authors estimate the scores from 20GB Vietnamese text corpora prepared in syllable-level and word-level forms. They use a window size of 20 to define the local context for the co-occurrence calculation. The method section specifies the score by name and describes its use as a ranking signal. It gives no equation or implementation details for choices such as handling candidates with sparse corpus evidence. The experiment therefore gives a concrete test of adding corpus-based associations to IRNet, while the description supports a higher-level account of how that addition operates.

#### Adding information about syntax

The paper tests another kind of information that originates outside text-to-SQL training. A [dependency parser](https://md.research.elamur.ai/free/en/concepts/dependency-parsing/) learns relationships between words in a sentence. Its internal representations can contain information that helps it identify those relationships. The authors ask whether those representations are also helpful when deciding how a Vietnamese question maps to database operations.

They use jPTDP, a dependency parser already trained for Vietnamese. The input to jPTDP in this experiment is the segmented word-level text. The authors extract the hidden representations from its bidirectional encoder and use them as part of the input embeddings in EditSQL and IRNet. An embedding is a numerical representation that a neural network can use. Adding the dependency encoder’s representations gives the SQL parser features learned for a different linguistic task alongside the information it ordinarily receives.

The features are called latent because they are carried by the dependency parser’s numerical representations. Earlier studies discussed by the authors had taken explicit syntactic features from dependency trees, such as information defined by a particular parse structure. The Vietnamese experiment uses the encoder’s representations directly. Consequently, the comparison tests the usefulness of those representations as a package. A successful result can establish that the package helped without identifying a particular dependency relation that changed a prediction.

#### Preparing embeddings and contextual encoders

The ordinary input embeddings are trained separately for syllables and for words using the skip-gram version of [Word2Vec](https://md.research.elamur.ai/free/en/papers/mikolov-2013-distributed-representations-words-phrases-their/). Skip-gram training learns representations from which units tend to occur in the contexts of other units. Each syllable or word is represented by a 300-dimensional vector in the corresponding setting. The authors use Vietnamese text corpora of 20GB and keep these embeddings fixed during text-to-SQL training. A change from syllables to words therefore changes both the boundaries of the units and the embeddings attached to those units.

The prior EditSQL and IRNet work used [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) to strengthen the representations available to the parser. The Vietnamese study investigates contextual pretraining with XLM-R-base and PhoBERT-base. A contextual encoder represents an input unit in relation to the sequence in which it appears. For example, a reference to a name in a song question can be represented in the context of the expressions for the song and the singer. The SQL parser can then use a representation that reflects that occurrence of the expression, alongside the schema and its other inputs.

[XLM-R](https://md.research.elamur.ai/free/en/papers/conneau-2020-unsupervised-cross-lingual-representation-learning/) is multilingual and is paired with syllable-level Vietnamese in the study. The authors describe it as based on [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/), with pretraining on a 2.5TB multilingual corpus containing 137GB of syllable-level Vietnamese. PhoBERT is a Vietnamese-specific variant of RoBERTa pretrained on 20GB of word-level Vietnamese text. The study pairs it with the segmented inputs. It updates both pretrained encoders during task training, a process known as [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/).

These are distinct configurations. The basic syllable and word settings use their corresponding fixed skip-gram embeddings. The dependency setting adds features derived from jPTDP in the word-level setup. The contextual settings pair a particular pretrained encoder with the input level used for it in the study. The experimental design can compare the results of those complete choices. Explaining a difference between PhoBERT and XLM-R requires keeping track of their different Vietnamese input units and pretraining conditions.

#### Training and choosing a checkpoint

The authors take the training hyper-parameters for each parser from its earlier work. They train for 10 epochs, with an epoch representing a pass through the training data. After each epoch they measure exact matching on development questions and retain the checkpoint with the best development result for final evaluation. A checkpoint is the saved state of a system at a particular point during training. This procedure lets each configuration be evaluated on test using a training state selected before the test score is observed.

The authors choose EditSQL and IRNet because both performed strongly on English Spider and had implementations available for the investigation. They identify [RYANSQL](https://md.research.elamur.ai/free/en/papers/choi-2021-ryansql-recursively-applying-sketch-based/) and [RAT-SQL](https://md.research.elamur.ai/free/en/papers/wang-2020-rat-sql-relation-aware-schema/) as systems with strong contemporaneous Spider results, but their implementations were unavailable when the authors carried out the empirical work. The comparison consequently covers two practical baselines and several extensions within each. It provides a basis for examining the input and linking choices under the same Vietnamese data design.

### Experiments and results

#### What the splits contain

The full English Spider dataset is described as having 10,181 questions and 5693 SQL queries over 200 databases. At the time, the portion available for translation consisted of 9691 questions and 5263 SQL queries over 166 databases. Those are the totals for ViText2SQL. The study’s Vietnamese test set comes from a new division of that public material. The authors use the same division when they run their English comparison.

The training set has 6831 questions, 3493 SQL queries, and 99 databases, with an average of 5.4 tables per database. Development has 954 questions, 589 SQL queries, and 25 databases, with 4.2 tables per database on average. Test has 1906 questions, 1193 SQL queries, and 42 databases, with an average of 5.7 tables per database. Across the dataset the average is 5.3 tables per database. The question, query, and database totals describe different parts of the data. Accuracy is measured over questions, while the database split controls which schemas the system can have encountered when learning.

Spider’s hardness labels follow the SQL associated with each question. The Vietnamese test set contains 425 questions labeled easy, 779 medium, 402 hard, and 300 extra hard. In development the corresponding counts are 249 easy, 405 medium, 191 hard, and 109 extra hard. The training counts are 1559 easy, 2255 medium, 1502 hard, and 1515 extra hard. These categories support a breakdown by the demands of the reference query. The labels do not directly measure how natural a question sounds in Vietnamese or how difficult its phrasing is for a speaker to understand.

#### What the scores measure

The main metric is exact matching accuracy. Each predicted query is compared with the gold query, meaning the reference attached to the question. The metric gives the percentage of questions for which the output matches under the benchmark’s comparison. That makes it demanding when several decisions have to come together. Recovering the intended output column still leaves room to miss a filter, use an incorrect operator, or select the wrong table.

The authors also report component matching F1. F1 balances precision and recall, so a component can lose credit for predicted elements that do not belong or for reference elements that the system omitted. The breakdown covers `SELECT`, `WHERE`, `ORDER BY`, `GROUP BY`, and other SQL keywords. These categories show which kinds of decisions contribute to the overall score. A query can recover the intended `SELECT` expression, for instance, while disagreeing with the reference in `WHERE`. Component scores can register that distinction even when the full query is counted as a miss.

`SELECT` determines what the query returns. `WHERE` restricts the input rows, `GROUP BY` arranges rows into groups for operations such as counting per country, and `ORDER BY` determines how results are sorted. A score for a clause summarizes matching across the test examples evaluated for that component. The keyword score concerns a separate part of that component evaluation. These scores and the exact matching accuracy by hardness answer different questions about the same predictions.

#### Overall results on the human translations

The basic syllable-level EditSQL setting reaches 28.6 on development and 24.1 on test in exact matching accuracy. Its word-level counterpart reaches 33.7 on development and 30.2 on test. Basic IRNet reaches 43.3 on development and 38.2 on test at the syllable level, and 49.7 on development and 43.6 on test at the word level. IRNet has the higher score in both basic input settings on both splits.

The dependency-feature configurations start from the word-level setup. With those features, EditSQL reaches 45.3 on development and 42.2 on test, while IRNet reaches 52.2 on development and 47.1 on test. The contextual configurations score higher overall. EditSQL with XLM-R reaches 55.2 on development and 51.3 on test, and EditSQL with PhoBERT reaches 56.7 on development and 52.6 on test. For IRNet the XLM-R scores are 58.6 on development and 52.8 on test, and the PhoBERT scores are 60.2 on development and 53.2 on test. All of these are exact matching accuracies on the human-translated Vietnamese data.

EditSQL and IRNet configurations on ViText2SQL test exact matching PhoBERT gives each parser its highest overall test score, with IRNet leading the comparison.

**The numbers**

| System or setting | exact matching accuracy % |
| --- | --- |
| EditSQL, syllable baseline | 24.1 |
| EditSQL, word baseline | 30.2 |
| EditSQL, dependency features | 42.2 |
| EditSQL, XLM-R | 51.3 |
| EditSQL, PhoBERT | 52.6 |
| IRNet, syllable baseline | 38.2 |
| IRNet, word baseline | 43.6 |
| IRNet, dependency features | 47.1 |
| IRNet, XLM-R | 52.8 |
| IRNet, PhoBERT (this paper) | 53.2 |

The useful comparison within each parser is how the ordering changes as the inputs change. Both favor segmented words in the runs with fixed skip-gram embeddings. Both also score higher with dependency features than with their own basic word-level inputs. The contextual runs deliver the strongest overall results, but how much a configuration helps depends on the starting parser and the metric being examined. The tests by query hardness and SQL component make some of those differences visible.

#### Human and machine translation

For the translation comparison, the paper reports using a machine translation engine to render the English questions in Vietnamese. The baseline scores are lower for machine-translated questions at both input levels. At the syllable level, machine-translated EditSQL reaches 21.5 on development and 16.8 on test, and machine-translated IRNet reaches 25.4 on development and 20.3 on test. On the human translations, the corresponding basic results are 28.6 on development and 24.1 on test for EditSQL, and 43.3 on development and 38.2 on test for IRNet.

The word-level machine translations yield 22.8 on development and 17.4 on test for EditSQL, and 27.4 on development and 21.6 on test for IRNet. The matching word-level human-translation runs reach 33.7 on development and 30.2 on test for EditSQL, and 49.7 on development and 43.6 on test for IRNet. The paper regards the consistently higher scores as evidence for the value of its manual translation procedure. The comparison measures how trainable and predictable the questions are for these parsers under the tested setups.

Human and machine translation on ViText2SQL word-level test exact matching Both baseline parsers score higher on human-translated questions.

**The numbers**

| System or setting | exact matching accuracy % |
| --- | --- |
| EditSQL, machine translation | 17.4 |
| EditSQL, human translation | 30.2 |
| IRNet, machine translation | 21.6 |
| IRNet, human translation (this paper) | 43.6 |

#### Comparing Vietnamese and English

For English, the authors retrain the baseline parsers on the same division of the available Spider material. The English setup uses RoBERTa. EditSQL with RoBERTa obtains exact matching accuracy of 58.3 on development and 53.6 on test. English IRNet with RoBERTa reaches 63.8 on development and 55.3 on test. In Vietnamese, the PhoBERT counterparts obtain 56.7 on development and 52.6 on test for EditSQL, and 60.2 on development and 53.2 on test for IRNet.

Using the same underlying database partition makes these results easier to interpret. The English and Vietnamese test runs face corresponding database structures and query tasks. Their textual representations differ, and the pretrained encoders differ. The authors describe the Vietnamese results as lower but comparable and suggest that Vietnamese text-to-SQL may be about as tractable as English in a setup of this kind. The comparison shows what the tested pipelines achieve on a shared split.

#### Performance at different SQL difficulty levels

The hardest classes reveal a limit that the overall accuracy can obscure. With dependency features, EditSQL’s test exact matching accuracy is 65.7 for easy questions, 46.1 for medium, 37.6 for hard, and 16.8 for extra hard. With PhoBERT, its accuracies on those same categories are 75.6, 58.0, 47.4, and 22.7. The gains extend across the categories, while the extra-hard score shows how frequently a structurally demanding query still defeats the system.

For IRNet with dependency features the figures are 71.8 on easy, 51.5 on medium, 47.4 on hard, and 18.5 on extra hard. IRNet with PhoBERT reaches 76.8 on easy, 57.5 on medium, 47.2 on hard, and 24.8 on extra hard. IRNet with XLM-R reaches 76.2 on easy, 57.8 on medium, 46.8 on hard, and 23.5 on extra hard. These are test exact matching accuracies for the respective query classes. The strongest overall configuration has the highest reported easy and extra-hard IRNet scores, while the ordering is different for the medium and hard questions.

The split by hardness puts the language and query sides of the experiment in perspective. A simple query still requires the right link between words and schema. A harder query gives the parser more opportunities to make an error in assembling the whole structure. Higher overall accuracy can coexist with disagreements about where a particular input representation helps most. The error analysis traces some of those disagreements to concrete decisions about columns, operators, and query structure.

### What the ablations show

#### Word boundaries and corpus-based linking

The segmentation comparison holds the parser and translation source constant within each pair of basic runs. On the human-translated test set, EditSQL rises from 24.1 at the syllable level to 30.2 at the word level in exact matching accuracy. IRNet rises from 38.2 to 43.6. Development scores move in the same direction. The word-level input also has the higher score for each parser in the machine-translated runs, though the manual translations support stronger results overall.

These comparisons cover the practical change from spacing-based syllable input to automatically segmented words, each with its own embeddings. The mechanism makes sense for a phrase that forms a word across intervening spaces. Once the segmenter joins those parts, they can have a single word embedding, and the parser can encounter the same grouped form in a question and in schema text. The experiments measure the resulting change in SQL accuracy. They leave open how much of it comes from improved name matching, the changed embeddings, or other effects of representing the sequence with different units.

The paper contains a more direct removal test for IRNet’s NPMI linking extension. With that link information removed, the system assigns the `NONE` type to column names in the condition described by the authors. Exact matching accuracy falls by 6+% in absolute terms on both development and test. The paper reports the size of the decrease at that level of precision and gives no separate score for each split in this comparison.

The result supports giving IRNet evidence that connects a mentioned value with a schema column. That is distinct from the baseline’s ability to recognize strings that look like table or column names. A user can specify which value matters while leaving its attribute implicit. The removal experiment shows that the added corpus-derived evidence helps the complete parser recover the reference SQL. It does not break down individual links by correctness or show which competing column names account for the change.

#### Syntactic features and contextual pretraining

The dependency comparison adds jPTDP representations to the word-level inputs. Test exact matching goes from 30.2 to 42.2 for EditSQL and from 43.6 to 47.1 for IRNet. Both parsers benefit overall, with a more pronounced change for EditSQL. The baselines already encode sequences and schema information, so these runs establish that representations learned by the external dependency parser can add useful information to each system under the tested setup.

The paper describes the transferred information as latent syntax because of the task for which jPTDP learned it. The evaluation measures the downstream value of the features. It neither labels their dimensions with linguistic properties nor tests what happens when selected kinds of syntactic information are removed. A sentence can contain several expressions that plausibly attach to a noun or modify a condition, and syntax can give a parser clues about such relationships. The experiment provides aggregate evidence for the representation, while the path from a particular feature to a particular SQL choice remains unspecified.

The contextual configurations produce the largest overall scores. The authors particularly emphasize the results for `WHERE`, where the parser must decide what conditions apply to the relevant rows. On test, EditSQL’s `WHERE` F1 is 44.6 with dependency features, 60.3 with XLM-R, and 61.8 with PhoBERT. IRNet’s corresponding scores are 48.7, 59.1, and 59.3. Each contextual configuration improves substantially on the dependency-feature configuration for this component. The stronger scores indicate closer matching of filters as measured by the benchmark, which can involve the selected attributes and operators.

Input configurations on ViText2SQL test WHERE matching F1 Both parsers match filters more closely with contextual pretraining than with dependency features.

**The numbers**

| System or setting | WHERE component F1 |
| --- | --- |
| EditSQL, dependency features | 44.6 |
| EditSQL, XLM-R | 60.3 |
| EditSQL, PhoBERT (this paper) | 61.8 |
| IRNet, dependency features | 48.7 |
| IRNet, XLM-R | 59.1 |
| IRNet, PhoBERT | 59.3 |

The component results also explain why the overall rankings should be read at the level of the metric reported. IRNet with PhoBERT has the strongest overall test exact matching accuracy, but EditSQL with PhoBERT has the higher `WHERE` F1 in the displayed comparison. For `SELECT`, the test F1 scores with PhoBERT are 83.3 for EditSQL and 84.5 for IRNet. For `ORDER BY`, they are 72.5 for EditSQL and 76.6 for IRNet. The strength of the full query depends on how decisions across components combine within each example.

The comparison within IRNet also has exceptions to the overall PhoBERT advantage. Its XLM-R configuration reaches 68.3 test F1 for `GROUP BY`, with PhoBERT at 68.2. The test keyword F1 scores are 80.5 for XLM-R and 80.3 for PhoBERT. On medium questions, XLM-R scores 57.8 in test exact matching and PhoBERT scores 57.5. The overall result therefore favors the PhoBERT configuration across the full set of questions, while individual components and hardness categories give a more varied picture. The study reports these point scores without an analysis of their variability.

#### Inspecting the development failures

The authors examine the failures of IRNet with PhoBERT on the 954 development questions. Their analysis covers 382/954 examples that failed exact matching. This part of the paper supplies cases to inspect alongside the aggregate scores. It also shows how a failure under the benchmark can have different consequences depending on whether the output changes the intended operation.

Column prediction accounts for 121/382 failed examples, or 32%, in the authors’ analysis. The authors highlight columns whose names appear only in part or are absent from the wording. In the question about a song by the youngest singer, the intended output includes the song name and release year. The parser chooses a column equivalent to “name” where the reference uses “song name.” The distinction matters because the same question also concerns a singer. The parser has to separate the entity used to select the records from the entity whose attributes the user asks to see. Other column errors include omissions and extra columns in the filter.

Nested or otherwise complex SQL accounts for 84/382 of the failures, reported as about 22%. The authors say these cases mostly fall in the extra-hard category. A nested operation can supply a result needed by another part of the query. Recovering the appropriate column or aggregation is only part of the job when the query must also place it at the correct level. The analysis here identifies complexity as a common setting for failure. It does not assign a separate score to each kind of nesting.

Incorrect operators account for 70/382 of the failed cases, or 18%. The authors give the Vietnamese expressions for “oldest” and “youngest” as examples where the expected operations are `max` and `min`, respectively, and where the parser fails to produce the appropriate operation. Such a mistake can preserve the intended database attribute while changing the direction of the comparison. The reported 60/382 cases of incorrect table predictions in `FROM`, or 16%, concern a different decision about where the query should obtain its records.

The paper identifies 47/382 failures, about 12%, that it judges to express the intended query in a different form. In the stadium capacity example, the reference sorts capacities in descending order and takes the leading result. The prediction uses a maximum operation over the capacity column. In the authors’ interpretation, both express the request for the greatest capacity. The prediction fails exact matching because its structure differs from the reference. This example illustrates why execution accuracy, which would compare the answers obtained by running the queries, could credit some outputs that exact matching rejects. The paper provides this diagnostic through manual inspection and reports its main results using exact matching.

### Limitations

#### Limits the authors identify

The data release covers the available portion of Spider. The authors explain that they could translate the 9691 publicly accessible questions and their queries, while the full English benchmark contained 10,181 questions. Their split and English comparison are therefore defined on that public portion. The results establish performance on the new held-out Vietnamese databases and their English counterparts within this partition.

Practical availability also shaped the baseline selection. The authors identify stronger contemporaneous Spider systems whose implementations were unavailable at the time of the experiments. EditSQL and IRNet were strong, accessible choices for the comparisons the paper wanted to run. The results show what can be obtained with these two architectures. The observed ordering and usefulness of the extensions have that experimental scope.

The authors explicitly qualify exact matching through the equivalent-query examples in their error analysis. Their stadium example shows that two queries can implement the requested operation in different ways. The reported test scores use a reference-matching criterion. The count of equivalent formulations comes from manual review of development failures, which makes it a diagnostic about that set and parser. It does not provide a measured test execution score.

The conclusion presents the dataset as a starting point for work on Vietnamese question answering and dialogue. The study evaluates query generation from the benchmark’s questions. In particular, it does not evaluate conversations in which a user changes a request, refers back to an earlier answer, or relies on a system to ask for clarification. EditSQL’s original support for question history gives context for the choice of baseline. The reported Vietnamese experiments provide evidence about the single-question task.

#### Limits visible in the design

ViText2SQL is a human translation of an English benchmark. Consulting the original SQL helps preserve the intended operations, particularly where literal phrasing would be awkward. The authors also try to follow the English style when a literal translation works. Those choices produce examples anchored to the questions and query structures of Spider. The resulting benchmark measures Vietnamese questions of that origin. A collection of questions composed independently by Vietnamese users for their own databases could have a different mix of expressions, schema references, and requested tasks.

The machine-translation comparison covers questions produced by the engine used in the study. The authors report a downstream accuracy comparison, which reflects the interaction between translated inputs, reference queries, and the parsers’ ability to learn from them. A separate assessment of translation fidelity or naturalness would involve direct judgments about the questions. The SQL scores alone do not say whether a particular translation lost a condition, used an unusual but valid expression, or simply made a useful schema correspondence harder for a parser to recognize.

The contextual configurations vary several factors together. PhoBERT is trained for Vietnamese and applied to word-level input. XLM-R is trained on multilingual material and applied to syllable-level input. Their pretraining corpora also differ. The study establishes the ordering of these configurations for each parser on the Vietnamese benchmark. It leaves the independent contributions of language specialization, segmentation, and pretraining data unresolved. A similar issue applies to the English comparison. The shared split controls the source examples and databases, while the English and Vietnamese results come from systems with different encoders.

The paper reports point estimates selected through development accuracy. It gives no measure of run-to-run variability in the overall comparison. This matters most when interpreting close results or treating the relative order of configurations as a general property. The reported values are sufficient to identify the best tested checkpoint on each stated metric, but they do not quantify how stable small gaps would be across repeated training.

Segmentation is evaluated through the final SQL output. The study does not report a separate assessment of the segmenter’s decisions on the benchmark or trace which corrected boundaries account for improved queries. The gain supports trying the word-level preparation in these two pipelines. It leaves open whether the important changes were concentrated in multi-syllable schema names, question expressions, database values, or other parts of the input.

Finally, both the linking removal experiment and the manual analysis have specific scopes. The NPMI experiment tests the addition inside IRNet, whose architecture already uses schema linking information. Its reported decrease cannot tell a reader how the same corpus statistics would perform as an extension to EditSQL. The error analysis concerns the strongest IRNet configuration on development. It identifies several recurring failure types for that system, while the distributions for other parsers, translation settings, and the held-out test schemas remain unmeasured.

### What came after

#### Text-to-SQL beyond Vietnamese

Later citing work returns to the language coverage problem that motivates the pilot study. [Ar-Spider](https://md.research.elamur.ai/free/en/papers/almohaimeed-2024-ar-spider-text-sql-arabic/) takes up text-to-SQL in Arabic in connection with Spider. Its task is closely related to the Vietnamese paper’s central question about how to study the passage from a question in a different language to a SQL query. The citation establishes a connection between the studies. It does not establish that Ar-Spider adopts the Vietnamese translation procedure, database split, or parsing extensions.

[AraSpider](https://md.research.elamur.ai/free/en/papers/heakl-2024-araspider-democratizing-arabic-sql/) also concerns Arabic-to-SQL. The two Arabic projects belong to the same line of inquiry as the Vietnamese pilot at the level of language coverage. In each case, the task brings a natural-language question into contact with a shared database query language. The Vietnamese paper provides a precedent for treating the language of the questions and the representation of the schema as aspects of the experimental design. The two Arabic titles alone do not establish which design choices their authors share.

[Prompt Engineering Techniques for Context-dependent Text-to-SQL in Arabic](https://md.research.elamur.ai/free/en/papers/almohaimeed-2025-prompt-engineering-techniques-context-dependent/) focuses on how prompts are formulated for an Arabic text-to-SQL task that depends on context. That focus connects to two separate parts of the earlier study. The Vietnamese paper tests how the question is represented to a parser and describes EditSQL’s original design for questions in context. Its own benchmark experiments use individual questions. The later Arabic work’s stated focus concerns prompts and context-dependence, and the citation does not show that it uses EditSQL or inherits the earlier experimental setup.

#### Vietnamese resources and evaluation

[ViNLI](https://md.research.elamur.ai/free/en/papers/huynh-2022-vinli-vietnamese-corpus-studies-open/) is a Vietnamese corpus for open-domain natural language inference. The task addresses meaning through judgments about how statements relate to one another. That gives it a different evaluation target from a benchmark that asks for a database query. The connection to the pilot study lies in the construction of a resource for studying a particular kind of language understanding in Vietnamese. The citation provides evidence of that research connection without specifying any reuse of the SQL data.

[ViHOS](https://md.research.elamur.ai/free/en/papers/hoang-2023-vihos-hate-speech-spans-detection/) addresses hate speech spans in Vietnamese. Its target is the location of relevant stretches of text. The earlier pilot also makes the units of Vietnamese input a subject of investigation, but its output is a structured query corresponding to the question as a whole. The citation links work on Vietnamese resource development across these tasks. It gives no basis for attributing the choice of segmentation or annotation procedure in ViHOS to ViText2SQL.

[Crossing Linguistic Horizons](https://md.research.elamur.ai/free/en/papers/truong-2024-crossing-linguistic-horizons-finetuning-comprehensive/) concerns fine-tuning and broader evaluation of Vietnamese language technology. It connects most directly to the pilot study’s interest in evaluating a pretrained Vietnamese system on a specific benchmark. In the earlier work that evaluation takes a narrow form, with fixed database splits and SQL references defining what counts as a successful answer. The later work announces a wider evaluation scope. Its citation alone does not identify which parts of the Vietnamese benchmark, if any, it uses directly.

The [Vietnamese parallel-corpus work](https://md.research.elamur.ai/free/en/papers/le-2023-parallel-corpus-vietnamese-central-northern/) concerns Central and Northern Vietnamese. Its subject connects to a question that ViText2SQL’s design leaves open, which is how the variety of Vietnamese represented in a dataset relates to the task it measures. The pilot translates common database requests into Vietnamese and compares syllable and word inputs. The parallel-corpus work concerns correspondence across varieties. Across these citing works, the documented connection is strongest at the level of the tasks and resources they name. Direct adoption of the pilot study’s dataset, parser configurations, or linking method would require evidence beyond the citation.

## Cite

Cite as Anh Tuan Nguyen, Mai Hoang Dao and Dat Quoc Nguyen. 2020. A Pilot Study of Text-to-SQL Semantic Parsing for Vietnamese. Findings of the Association for Computational Linguistics: EMNLP 2020.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2020.findings-emnlp.364](https://doi.org/10.18653/v1/2020.findings-emnlp.364)

```bibtex
@inproceedings{nguyen2020pilot,
  title = {{A Pilot Study of Text-to-SQL Semantic Parsing for Vietnamese}},
  author = {Anh Tuan Nguyen, Mai Hoang Dao and Dat Quoc Nguyen},
  booktitle = {Findings of the Association for Computational Linguistics: EMNLP 2020},
  year = {2020},
  doi = {10.18653/v1/2020.findings-emnlp.364},
  url = {https://doi.org/10.18653/v1/2020.findings-emnlp.364}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
