Grammars & Parsing
Stylistic Fingerprints, POS-tags and Inflected Languages: A Case Study in Polish
Eder, Maciej, Górski, Rafał. L.
In stylometric investigations, frequencies of the most frequent words (MFWs) and character n-grams outperform other style-markers, even if their performance varies significantly across languages. In inflected languages, word endings play a prominent role, and hence different word forms cannot be recognized using generic text tokenization. Countless inflected word forms make frequencies sparse, making most statistical procedures complicated. Presumably, applying one of the NLP techniques, such as lemmatization and/or parsing, might increase the performance of classification. The aim of this paper is to examine the usefulness of grammatical features (as assessed via POS-tag n-grams) and lemmatized forms in recognizing authorial profiles, in order to address the underlying issue of the degree of freedom of choice within lexis and grammar. Using a corpus of Polish novels, we performed a series of supervised authorship attribution benchmarks, in order to compare the classification accuracy for different types of lexical and syntactic style-markers. Even if the performance of POS-tags as well as lemmatized forms was notoriously worse than that of lexical markers, the difference was not substantial and never exceeded ca. 15%.
Intel AVX-512 A Big Win For... JSON Parsing Performance
In addition to the many HPC workloads and other scientific computing tasks where Intel's AVX-512 performance on their latest processor proves very beneficial, it also turns out AVX-512 can provide significant benefit to a much more mundane web server task: JSON parsing. The simdjson project that is focused on "parsing gigabytes of JSON per second" this week issued simdjson 2.0 and is headlined by an Intel-led contribution of AVX-512 support. The JavaScript Object Notation (JSON) data interchange format is heavily used by practically all major websites/web-applications in some capacity and can be dealt with by pretty much all programming languages. JSON really need not any introduction. The past few years there has been simdjson as an open-source (Apache 2.0 licensed) project aimed at delivering the highest performance JSON parser that can parse "gigabytes of JSON per second" and claims of being 4 25x faster than alternatives.
Pre-training Data Quality and Quantity for a Low-Resource Language: New Corpus and BERT Models for Maltese
Micallef, Kurt, Gatt, Albert, Tanti, Marc, van der Plas, Lonneke, Borg, Claudia
Multilingual language models such as mBERT have seen impressive cross-lingual transfer to a variety of languages, but many languages remain excluded from these models. In this paper, we analyse the effect of pre-training with monolingual data for a low-resource language that is not included in mBERT -- Maltese -- with a range of pre-training set ups. We conduct evaluations with the newly pre-trained models on three morphosyntactic tasks -- dependency parsing, part-of-speech tagging, and named-entity recognition -- and one semantic classification task -- sentiment analysis. We also present a newly created corpus for Maltese, and determine the effect that the pre-training data size and domain have on the downstream performance. Our results show that using a mixture of pre-training domains is often superior to using Wikipedia text only. We also find that a fraction of this corpus is enough to make significant leaps in performance over Wikipedia-trained models. We pre-train and compare two models on the new corpus: a monolingual BERT model trained from scratch (BERTu), and a further pre-trained multilingual BERT (mBERTu). The models achieve state-of-the-art performance on these tasks, despite the new corpus being considerably smaller than typically used corpora for high-resourced languages. On average, BERTu outperforms or performs competitively with mBERTu, and the largest gains are observed for higher-level tasks.
How Writing SQL Could Get a Whole Lot Easier With NLQ
What is the most intuitive, efficient, and least mentally draining way to ask a question? It is using the simplest words possible in your own language. Modern search engines such as Google has made searching for information online using simple sentences commonplace. This had helped create our modern society and improved access to information globally; it's hard to overstate how transformational the advent of the search engine truly was. However, searching for information on the internet didn't truly become democratized and popular until we could ask the internet questions using natural language in the same way we would talk to another person.
Stream Output When Parsing Big Xml With Elixir
There are two big players in elixir's XML parsing ecosystem: I want to read a huge XML file that has some elements very repeated, and want to produce some kind of "iterator" from it. I'd like to produce some iterator that, when iterated, produces this: Saxy is incredibly fast and performant, but it's based on the concept that, as you read the XML file, you "fill" some state object (with whatever you want, and the amount you want, but, nevertheless, you fill it). In this scenario, I could "fill" the state with the list of items. That, of course, is a lot less memory than it would take to hold the entire XML structure in memory. But still it establishes a relationship between the size of the XML file and the size of the stored in-memory list, which I don't like because that means that if I use a big enough file, I can consume more memory than I'm allowed to. SweetXml provides some function called stream_tags and when you see what it does, it seems that it hits the spot!!! because it says it's just what I need: parse an xml and, as it finds certain tags, stream the SweetXml representation of them, and it doesn't build into memory any structure representing xml.
Resolution of the Burrows-Wheeler Transform Conjecture
The Burrows-Wheeler Transform (BWT) is an invertible text transformation that permutes symbols of a text according to the lexicographical order of its suffixes. BWT is the main component of popular lossless compression programs (such as bzip2) as well as recent powerful compressed indexes (such as the r-index7), central in modern bioinformatics. The compressibility of BWT is quantified by the number r of equal-letter runs in the output. Despite the practical significance of BWT, no nontrivial upper bound on r is known. By contrast, the sizes of nearly all other known compression methods have been shown to be either always within a poly-log n factor (where n is the length of the text) from z, the size of Lempel–Ziv (LZ77) parsing of the text, or much larger in the worst case (by an nε factor for ε 0). In this paper, we show that r (z log2 n) holds for every text. This result has numerous implications for text indexing and data compression; in particular: (1) it proves that many results related to BWT automatically apply to methods based on LZ77, for example, it is possible to obtain functionality of the suffix tree in (z polylog n) space; (2) it shows that many text processing tasks can be solved in the optimal time assuming the text is compressible using LZ77 by a sufficiently large polylog n factor; and (3) it implies the first nontrivial relation between the number of runs in the BWT of the text and of its reverse. In addition, we provide an (z polylog n)-time algorithm converting the LZ77 parsing into the run-length compressed BWT. To achieve this, we develop several new data structures and techniques of independent interest. In particular, we define compressed string synchronizing sets (generalizing the recently introduced powerful technique of string synchronizing sets11) and show how to efficiently construct them. Next, we propose a new variant of wavelet trees for sequences of long strings, establish a nontrivial bound on their size, and describe efficient construction algorithms. Finally, we develop new indexes that can be constructed directly from the LZ77 parsing and efficiently support pattern matching queries on text substrings. Lossless data compression aims to exploit redundancy in the input data to represent it in a small space.
Beyond Distributional Hypothesis: Let Language Models Learn Meaning-Text Correspondence
Jang, Myeongjun, Mtumbuka, Frank, Lukasiewicz, Thomas
The logical negation property (LNP), which implies generating different predictions for semantically opposite inputs, is an important property that a trustworthy language model must satisfy. However, much recent evidence shows that large-size pre-trained language models (PLMs) do not satisfy this property. In this paper, we perform experiments using probing tasks to assess PLM's LNP understanding. Unlike previous studies that only examined negation expressions, we expand the boundary of the investigation to lexical semantics. Through experiments, we observe that PLMs violate the LNP frequently. To alleviate the issue, we propose a novel intermediate training task, names meaning-matching, designed to directly learn a meaning-text correspondence, instead of relying on the distributional hypothesis. Through multiple experiments, we find that the task enables PLMs to learn lexical semantic information. Also, through fine-tuning experiments on 7 GLUE tasks, we confirm that it is a safe intermediate task that guarantees a similar or better performance of downstream tasks. Finally, we observe that our proposed approach outperforms our previous counterparts despite its time and resource efficiency.
GEC -- Grammatical Error Correction
With millions of people trying to move abroad every year, it has become more and more difficult to achieve it. One of the most important skills required for it is good English Communication. Since majority of the people in this category come from countries where English isn't the first language, they are already at a disadvantage. Automated Grammatical Error Correction (GEC) can be an essential and useful tool for millions of people who learn English as a second language. It can either be used to improve their grammatical knowledge or used on a daily basis to communicate with other people efficiently.
Learn from Structural Scope: Improving Aspect-Level Sentiment Analysis with Hybrid Graph Convolutional Networks
Xu, Lvxiaowei, Pang, Xiaoxuan, Wu, Jianwang, Cai, Ming, Peng, Jiawei
Aspect-level sentiment analysis aims to determine the sentiment polarity towards a specific target in a sentence. The main challenge of this task is to effectively model the relation between targets and sentiments so as to filter out noisy opinion words from irrelevant targets. Most recent efforts capture relations through target-sentiment pairs or opinion spans from a word-level or phrase-level perspective. Based on the observation that targets and sentiments essentially establish relations following the grammatical hierarchy of phrase-clause-sentence structure, it is hopeful to exploit comprehensive syntactic information for better guiding the learning process. Therefore, we introduce the concept of Scope, which outlines a structural text region related to a specific target. To jointly learn structural Scope and predict the sentiment polarity, we propose a hybrid graph convolutional network (HGCN) to synthesize information from constituency tree and dependency tree, exploring the potential of linking two syntax parsing methods to enrich the representation. Experimental results on four public datasets illustrate that our HGCN model outperforms current state-of-the-art baselines.
Is COVID more dangerous than driving? How scientists are parsing COVID-19 risks.
Like it or not, the choose-your-own-adventure period of the pandemic is upon us. Some free testing sites have closed. Whatever parts of the United States were still trying to collectively quell the pandemic have largely turned their focus away from communitywide advice. Now, even as case numbers begin to climb again and more infections go unreported, the onus has fallen on individual Americans to decide how much risk they and their neighbors face from the coronavirus -- and what, if anything, to do about it. For many people, the threats posed by COVID-19 have eased dramatically over the two years of the pandemic.