The Erya or Erh-ya is the first surviving Chinese dictionary. Bernhard Karlgren (1931:49) concluded that "the major part of its glosses must reasonably date from the 3rd century BC."
Chinese scholars interpret the first title character ěr (; "you, your; adverbial suffix") as a phonetic loan character for the homophonous ěr (; "near; close; approach"), and believe the second yǎ (; "proper; correct; refined; elegant") refers to words or language. According to W. South Coblin: "The interpretation of the title as something like 'approaching what is correct, proper, refined' is now widely accepted" (1993:94). It has been translated as "The Literary Expositor" or "The Ready Rectifier" (both by Legge), "Progress Towards Correctness" (von Rosthorn), "Near Correct" (Xue), "The Semantic Approximator" (Needham), and "Approaching Elegance" (Mair).
The book's author is unknown. Although it is traditionally attributed to the Duke of Zhou, Confucius, or his disciples, scholarship suggests that someone compiled and edited diverse glosses from commentaries to pre-Qin texts, especially the Shijing. Joseph Needham et al. (1986:191) place the Erya'''s compilation between the late 4th and early 2nd centuries BCE, with the possible existence of some core text material dating back to the 6th century BCE, and the continued additions to the text as late as the 1st century BCE.
The first attempts to date the different parts of the Erya separately began when the Tang scholar Lu Deming (556-627) suggested that the Duke of Zhou only compiled the Shigu () chapter (1), while the rest of the text dated from later . The Japanese historian and sinologist Naitō Torajirō analyzed the Erya text and concluded it originated in the early Warring States period, with the Jixia Academy having a considerable hand in it from c. 325 BCE onwards, and the text was enlarged and stabilized during the Qin and Western Han dynasty.