Although Chinese characters in Vietnam are now limited to ceremonial uses, they were once in widespread use. Until the early 20th century, Literary Chinese was used in Vietnam for all official and scholarly writing. Around the 13th century the Nôm script was developed to record folk literature in the Vietnamese language. The script used Chinese characters to represent both borrowed Sino-Vietnamese vocabulary and native words with similar pronunciation or meaning. In addition thousands of new compound characters were created to write Vietnamese words. This process resulted in a highly complex system that was never mastered by more than 5% of the population. Both Literary Chinese and Nôm were replaced in the early 20th century by Vietnamese written with the Latin-based Vietnamese alphabet.