Grammars & Parsing
Introduction to Neural Transfer Learning with Transformers for Social Science Text Analysis
Transformer-based models for transfer learning have the potential to achieve high prediction accuracies on text-based supervised learning tasks with relatively few training data instances. These models are thus likely to benefit social scientists that seek to have as accurate as possible text-based measures but only have limited resources for annotating training data. To enable social scientists to leverage these potential benefits for their research, this paper explains how these methods work, why they might be advantageous, and what their limitations are. Additionally, three Transformer-based models for transfer learning, BERT (Devlin et al. 2019), RoBERTa (Liu et al. 2019), and the Longformer (Beltagy et al. 2020), are compared to conventional machine learning algorithms on three applications. Across all evaluated tasks, textual styles, and training data set sizes, the conventional models are consistently outperformed by transfer learning with Transformers, thereby demonstrating the benefits these models can bring to text-based social science research.
Most Frequently Asked NLP Interview Questions - Analytics Vidhya
This article was published as a part of the Data Science Blogathon. Natural language processing (NLP) is the branch of computer science and, more specifically, the domain of artificial intelligence (AI) that focuses on providing computers the ability to understand written and spoken language in a way similar to that of humans. Combining computational linguistics (rule-based modeling of human language) with statistical, machine learning, and deep learning models is natural language processing (NLP). Together, these technologies enable computers to'understand' the whole meaning of human language in the form of text or speech data, including the speaker's or writer's purpose and emotion. NLP is the driving force behind computer systems that translate text from one language to another, respond to spoken commands, and swiftly summarise massive amounts of information--even in real-time.
A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future Directions
Qin, Bowen, Hui, Binyuan, Wang, Lihan, Yang, Min, Li, Jinyang, Li, Binhua, Geng, Ruiying, Cao, Rongyu, Sun, Jian, Si, Luo, Huang, Fei, Li, Yongbin
Text-to-SQL parsing is an essential and challenging task. The goal of text-to-SQL parsing is to convert a natural language (NL) question to its corresponding structured query language (SQL) based on the evidences provided by relational databases. Early text-to-SQL parsing systems from the database community achieved a noticeable progress with the cost of heavy human engineering and user interactions with the systems. In recent years, deep neural networks have significantly advanced this task by neural generation models, which automatically learn a mapping function from an input NL question to an output SQL query. Subsequently, the large pre-trained language models have taken the state-of-the-art of the text-to-SQL parsing task to a new level. In this survey, we present a comprehensive review on deep learning approaches for text-to-SQL parsing. First, we introduce the text-to-SQL parsing corpora which can be categorized as single-turn and multi-turn. Second, we provide a systematical overview of pre-trained language models and existing methods for text-to-SQL parsing. Third, we present readers with the challenges faced by text-to-SQL parsing and explore some potential future directions in this field.
On Unsupervised Training of Link Grammar Based Language Models
In this short note we explore what is needed for unsupervised training of graph language models based on link grammars. First, we introduce the termination tags formalism required to build a language model based on a link grammar formalism of Sleator and Temperley [21] and discuss the influence of context on the unsupervised learning of link grammars. Second, we propose a statistical link grammar formalism, allowing for statistical language generation. Third, based on the above formalism, we show that the classical dissertation of Yuret [25] on discovery of linguistic relations using lexical attraction ignores contextual properties of the language, and thus the approach to unsupervised language learning relying just on bigrams is flawed. This correlates well with the unimpressive results in unsupervised training of graph language models based on bigram approach of Yuret.
SeSQL: Yet Another Large-scale Session-level Chinese Text-to-SQL Dataset
Huang, Saihao, Wang, Lijie, Li, Zhenghua, Liu, Zeyang, Dou, Chenhui, Yan, Fukang, Xiao, Xinyan, Wu, Hua, Zhang, Min
As the first session-level Chinese dataset, CHASE contains two separate parts, i.e., 2,003 sessions manually constructed from scratch (CHASE-C), and 3,456 sessions translated from English SParC (CHASE-T). We find the two parts are highly discrepant and incompatible as training and evaluation data. In this work, we present SeSQL, yet another large-scale session-level text-to-SQL dataset in Chinese, consisting of 5,028 sessions all manually constructed from scratch. In order to guarantee data quality, we adopt an iterative annotation workflow to facilitate intense and in-time review of previous-round natural language (NL) questions and SQL queries. Moreover, by completing all context-dependent NL questions, we obtain 27,012 context-independent question/SQL pairs, allowing SeSQL to be used as the largest dataset for single-round multi-DB text-to-SQL parsing. We conduct benchmark session-level text-to-SQL parsing experiments on SeSQL by employing three competitive session-level parsers, and present detailed analysis.
Learning and Compositionality: a Unification Attempt via Connectionist Probabilistic Programming
We consider learning and compositionality as the key mechanisms towards simulating human-like intelligence. While each mechanism is successfully achieved by neural networks and symbolic AIs, respectively, it is the combination of the two mechanisms that makes human-like intelligence possible. Despite the numerous attempts on building hybrid neuralsymbolic systems, we argue that our true goal should be unifying learning and compositionality, the core mechanisms, instead of neural and symbolic methods, the surface approaches to achieve them. In this work, we review and analyze the strengths and weaknesses of neural and symbolic methods by separating their forms and meanings (structures and semantics), and propose Connectionist Probabilistic Programs (CPPs), a framework that connects connectionist structures (for learning) and probabilistic program semantics (for compositionality). Under the framework, we design a CPP extension for small scale sequence modeling and provide a learning algorithm based on Bayesian inference. Although challenges exist in learning complex patterns without supervision, our early results demonstrate CPP's successful extraction of concepts and relations from raw sequential data, an initial step towards compositional learning.
g2pW: A Conditional Weighted Softmax BERT for Polyphone Disambiguation in Mandarin
Chen, Yi-Chang, Chang, Yu-Chuan, Chang, Yen-Cheng, Yeh, Yi-Ren
Polyphone disambiguation is the most crucial task in Mandarin grapheme-to-phoneme (g2p) conversion. Previous studies have approached this problem using pre-trained language models, restricted output, and extra information from Part-Of-Speech (POS) tagging. Inspired by these strategies, we propose a novel approach, called g2pW, which adapts learnable softmax-weights to condition the outputs of BERT with the polyphonic character of interest and its POS tagging. Rather than using the hard mask as in previous works, our experiments show that learning a soft-weighting function for the candidate phonemes benefits performance. In addition, our proposed g2pW does not require extra pre-trained POS tagging models while using POS tags as auxiliary features since we train the POS tagging model simultaneously with the unified encoder. Experimental results show that our g2pW outperforms existing methods on the public CPP dataset. All codes, model weights, and a user-friendly package are publicly available.
Parsing the Results of a Chaotic New York Primary
Four years ago, Alexandria Ocasio-Cortez's shock victory in a low-turnout midterm primary election in New York changed the shape of American politics. On Tuesday, the state held low-turnout midterm primaries with no such results. Instead, what the most-watched races offered was the latest glimpse of the ongoing fight between progressive insurgents and Democratic Party loyalists in New York. Loyalists claimed the day's biggest victories, thanks in large part to the state's new political maps--a consequence of a 2020 redistricting process that some of those same Party loyalists, led by then Governor Andrew Cuomo, botched so badly that a state judge ultimately outsourced the job to a postdoctoral fellow at Carnegie Mellon. The race that got the most attention, and which had the closest outcome, was for an open seat in the newly redrawn Tenth Congressional District, where the attorney Dan Goldman--who served as the House Democrats' lawyer during Donald Trump's first impeachment--squeaked out a victory in a crowded field.
Computational valency lexica and Homeric formularity
McGillivray, Barbara, Rodda, Martina Astrid
Distributional semantics, the quantitative study of meaning variation and change through corpus collocations, is currently one of the most productive research areas in computational linguistics. The wider availability of big data and of reproducible algorithms for analysis has boosted its application to living languages in recent years. But can we use distributional semantics to study a language with such a limited corpus as ancient Greek? And can this approach tell us something about such vexed questions in classical studies as the language and composition of the Homeric poems? Our paper will compare the semantic flexibility of formulae involving transitive verbs in archaic Greek epic to similar verb phrases in a non-formulaic corpus, in order to detect unique patterns of variation in formulae. To address this, we present AGVaLex, a computational valency lexicon for ancient Greek automatically extracted from the Ancient Greek Dependency Treebank. The lexicon contains quantitative corpus-driven morphological, syntactic and lexical information about verbs and their arguments, such as objects, subjects, and prepositional phrases, and has a wide range of applications for the study of the language of ancient Greek authors.
Recent Advances in Text-to-SQL: A Survey of What We Have and What We Expect
Deng, Naihao, Chen, Yulong, Zhang, Yue
Text-to-SQL has attracted attention from both the natural language processing and database communities because of its ability to convert the semantics in natural language into SQL queries and its practical application in building natural language interfaces to database systems. The major challenges in text-to-SQL lie in encoding the meaning of natural utterances, decoding to SQL queries, and translating the semantics between these two forms. These challenges have been addressed to different extents by the recent advances. However, there is still a lack of comprehensive surveys for this task. To this end, we review recent progress on text-to-SQL for datasets, methods, and evaluation and provide this systematic survey, addressing the aforementioned challenges and discussing potential future directions. We hope that this survey can serve as quick access to existing work and motivate future research.