自然语言生成

自然語言生成(NLG)是自然語言處理的一部分,從知識庫邏輯形式英语Logic Form (Linguistics)等等機器表述系統去生成自然語言。這種形式表述當作心理表述的模型時,心理語言學家會選用語言產出英语language production這個術語。

自然語言生成系統可以說是一種將資料轉換成自然語言表述的翻譯器。不過產生最終語言的方法不同於編譯程式,因為自然語言多樣的表達。NLG出現已久,但是商業NLG技術直到最近才變得普及。

自然語言生成可以視為自然語言理解的反向: 自然語言理解系統須要釐清輸入句的意涵,從而產生機器表述語言;自然語言生成系統須要決定如何把概念轉化成語言。

一個簡單的例子是套用信函的生成系統。這種系統通常沒有運用文法的知識,但是可以生成信函給消費者,例如告訴消費者信用卡的額度已達。換言之,簡單的系統運用版型,跟Word文件的郵件合併程式沒什麼差別,但是更複雜的NLG系統會靈活地產生文本。

正如自然語言處理的其它領域,自然語言生成可以使用明確的語言模型(例如文法)或者運用根據真人所寫的文本分析而成的統計模型[1]

示例

「蘇格蘭花粉預報系統」[2]就是一個基於版型的簡單自然語言生成系統。該系統利用蘇格蘭幾個區域花粉預報的六個輸入數目,生成簡短的花粉等級文本作為輸出。

例如使用2005年7月1日的歷史資料,該軟體的輸出:

星期五花粉等級已從昨天的中級到今天的高級,全國大部分地區的數值在6到7。不過北部是中級,數值為4。

對比實際的預報(氣象員手擬)如下:

蘇格蘭大部分地區花粉量還是很高,為6級,東南部更是7級。只有北方島嶼及蘇格蘭東北角情況舒緩,花粉量中等。

步驟

生成文本的過程可以簡單到取用已準備好的章句,再用連結的文字組合起來。在簡單的領域如占星機器或個人化商業信件,成果可能令人滿意。不過複雜的自然語言生成系統必須經過規劃以及合併資訊的步驟,從而生成看似自然並且避免重複的文本。自然語言生成典型的步驟,例如戴爾與瑞特[3]所提出的如下:

決定內容英语Content determination:決定在文本裡置入哪些資訊。用上一節花粉預報軟體為例,是否要明確提到東南部花粉級數為7。

架構文件英语Document structuring:所傳達資訊的整體組織。例如決定先描述高花粉量地區,再提及低花粉量地區。

聚集語句英语Aggregation (linguistics):合併類似的句子,讓文本更可讀、更自然。例如合併下兩個句子「星期五花粉等級已從昨天的中級到今天的高級」和「全國大部分地區的花粉等級在6到7」成為「星期五花粉等級已從昨天的中級到今天的高級,全國大部分地區的數值在6到7。」

選擇字詞英语Lexical choice:選用表達概念的文字。例如決定要用「中等」還是「中級」。

指涉語生成英语Referring expression generation:產生能辨認物體或地區的指涉語英语referring expression (RE)。例如用「北方島嶼和蘇格蘭東北角」指涉蘇格蘭的某個地區。這個任務也包括決定代名詞以及其它的照應語英语Anaphora (linguistics)

實現文本英语realization (linguistics):根據句法學構詞學正寫法的規則產生實際的文本。

應用

大眾媒體向來以報導會說笑話的NLG系統為重點(參見「計算幽默英语computational humor」),不過從商業的角度,最成功的NLG應用是從資料庫或資料集產生文字摘要的「資料轉文本」系統,這些系統通常除了文字生成外,也進行資料分析,特別是幾個已經建成的從氣象資料產生氣象報告文的系統。此類系統最早是加拿大的FoG[4],於1990年代開始製作英、法語的氣象報告,其成功引領了其它研究和商業系統。近年的一個研究顯示,使用者有時候偏好電腦產生的氣象報告,因為使用的術語比較一致[5]。另一個研究顯示統計的技巧可以用來生成高品質的氣象報告[6]

1990年代自然語言生成開始用於財金和商業摘要。例如AC尼爾森研發的SPOTLIGHT系統,分析大量零售資料然後自動產生可讀的英文[7]

更近的NLG也用於摘要電子醫療記錄,已有商業應用問世[8],研究人員已顯示NLG摘要的醫療資料可以有效輔助醫療專業人員做決定[9]

內容生成系統可以輔助真人作者,讓寫作過程更有效率。例如利用搜索引擎應用界面,基於網路探勘英语web mining建立的內容生成工具[10],模擬作者根據各種搜尋結果形成內容,有如剪貼的寫作場景。相關度的驗證,對於過濾不相關的搜尋結果至為重要,方法基於匹配問題與可能答案的語法樹[11]。另一種方法利用真人寫的文本建立高層次結構的版型,然後自動寫成維基百科新的條目[12]

評量

自然語言生成的研究人員需要測試他們的系統、模組、演算法,一如其它的科學領域。這叫做「評量」。評量NLG系統的基本技巧有三種:

  • 「任務型(外部)評量」:把生成的文本給一個人,評估其幫助此人完成任務的效用。例如評量醫療資料摘要系統,可以評估醫生使用摘要後,是否能做出更佳的決定。
  • 「人為評價」:把文本給人,讓他們自行評估其品質與效用。
  • 「測量指標」:根據同樣的輸入資料,比較生成的文本與真人寫成的文本,使用例如BLEU英语BLEU之類的自動測量指標。

「任務型評量」雖然較接近NLG系統助人的終極目標,但是費時耗財,而且可能實行困難(尤其涉及醫生之類的專家對象),因此(一如自然語言處理的其它領域)「任務型評量」是例外而非主流。

參考文獻

  1. ^ Perera R, Nand P. Recent Advances in Natural Language Generation: A Survey and Classification of the Empirical Literature. Computing and Informatics. 2017, 36 (1): 1–32 [2017-12-04]. (原始内容存档于2021-02-25). 
  2. ^ R Turner, S Sripada, E Reiter, I Davy (2006). Generating Spatio-Temporal Descriptions in Pollen Forecasts.页面存档备份,存于互联网档案馆Proceedings of EACL06
  3. ^ Dale, Robert; Reiter, Ehud. Building natural language generation systems. Cambridge, U.K.: Cambridge University Press. 2000. ISBN 0-521-02451-X. 
  4. ^ Goldberg E, Driedger N, Kittredge R. Using Natural-Language Processing to Produce Weather Forecasts. IEEE Expert. 1994, 9 (2): 45–53. doi:10.1109/64.294135. 
  5. ^ Reiter E, Sripada S, Hunter J, Yu J, Davy I. Choosing Words in Computer-Generated Weather Forecasts. Artificial Intelligence. 2005, 167: 137–69. doi:10.1016/j.artint.2005.06.006. 
  6. ^ Belz A. Automatic Generation of Weather Forecast Texts Using Comprehensive Probabilistic Generation-Space Models. Natural Language Engineering. 2008, 14: 431–55. doi:10.1017/s1351324907004664. 
  7. ^ Anand, Tej; Kahn, Gary. Making Sense of Gigabytes: A System for Knowledge-Based Market Analysis (PDF). Klahr, Philip; Scott, A. F. (编). Innovative applications of artificial intelligence 4: proceedings of the IAAI-92 Conference. Menlo Park, Calif: AAAI Press. 1992: 57–70 [2017-12-10]. ISBN 0-262-69155-8. (原始内容 (PDF)存档于2016-08-01). 
  8. ^ Harris MD. Building a Large-Scale Commercial NLG System for an EMR (PDF). Proceedings of the Fifth International Natural Language Generation Conference: 157–60. 2008 [2017-12-10]. (原始内容 (PDF)存档于2019-11-05). 
  9. ^ Portet F, Reiter E, Gatt A, Hunter J, Sripada S, Freer Y, Sykes C. Automatic Generation of Textual Summaries from Neonatal Intensive Care Data. Artificial Intelligence. 2009, 173 (7–8): 789–816. doi:10.1016/j.artint.2008.12.002. 
  10. ^ Galitsky, Boris. A Web Mining Tool for Assistance with Creative Writing. Advances in Information Retrieval. Lecture Notes in Computer Science. 2013, 7814: 828–831 [2017-12-10]. doi:10.1007/978-3-642-36973-5_95. (原始内容存档于2019-12-02). 
  11. ^ Galitsky B, de la Rosa JL, Dobrocsi G. Inferring the semantic properties of sentences by mining syntactic parse trees. Data & Knowledge Engineering. 2012, 81–82: 21–45. doi:10.1016/j.datak.2012.07.003. 
  12. ^ Sauper, Christina & Barzilay, Regina. Automatically Generating Wikipedia Articles: A Structure-Aware Approach. Proceedings of ACL. 2009. 
  • Yuko Sakai (2017). Sentence Generation: Syntax Tree Diagram in English, Spanish, Chinese, Japanese, Ainu. ISBN 978-1545429006

其它文獻

  • Dale, Robert; Reiter, Ehud. Building natural language generation systems. Cambridge, UK: Cambridge University Press. 2000. ISBN 0-521-02451-X. 
  • Evans, Roger; Piwek, Paul; Cahill, Lynne. What is NLG?. New York, US. 2002.  |conference=被忽略 (帮助)

參見

外部連結

Read other articles:

10ª Flottiglia MASTeseo Tesei, sviluppatore del siluro a lenta corsa Descrizione generaleAttiva23 aprile 1939 - 8 settembre 1943 Nazione Italia RuoloAttacco al naviglio nemico in rada tramite sabotaggio e in mare aperto con l'uso di naviglio sottile silurante o esplodente EquipaggiamentoNaviglio sottile; mezzi d'assalto subacquei e di superficie trasportabili da sommergibili modificati MottoMemento audere semper per la 1ª Flottiglia MASPer il Re e per la bandiera per la Xª Flottiglia ...

 

 

detikcomURLwww.detik.comTipeSitus web beritaPerdagangan ?YaRegistration (en)OpsionalLangueIndonesiaPemilikdetik NetworkPembuatBudiono DarsonoYayan SopyanAbdul RahmanDidi NugrahadiService entry (en)9 Juli 1998; 25 tahun lalu (1998-07-09)NegaraIndonesia Peringkat Alexa111 (hingga Agustus 2018[update])[1]KeadaanAktif detikcom adalah sebuah situs web berita di Indonesia. detik.com hanya mempunyai edisi daring dan menggantungkan pendapatan dari bidang iklan. Sejak t...

 

 

Sandeep Sawant. Sandeep Sawant adalah seorang pembawa acara film, televisi, dan teater India.[1][2] Ia adalah sutradara dan penulis naskah film berbahasa Marathi pemenang penghargaan nasional[3] Shwaas.[4] Shwaas adalah film debut-nya.[2] Sandeep Unnithan menyebutnya telah memulihkan kembali sinema Marathi.[2] Sawant telah membuat dokumenter-dokumenter untuk televisi, beberapa diantaranya berkaitan dengan anak-anak. Mukta Rajadhyaksha menyatakan...

Масонство Направления Регулярное масонство Либеральное масонство Масонство Принса Холла Терминология Словарь масонских терминов Список масонов Категория:Масоны История масонства Холлиуэллский манускрипт Категория:История масонства Масонские уставы Масонские уста...

 

 

Košice-okolie District in the Kosice Region Malá Lodina (Hungarian: Kisladna) is a village and large municipality in Košice-okolie District in the Kosice Region of eastern Slovakia. History In historical records, the village was first mentioned in 1386. Geography The village lies at an altitude of 265 metres and covers an area of 38.348 km2. It has a population of about 195 people. External links [1] vteMunicipalities of Košice–okolie District Medzev Moldava nad Bodvou Bačkovík B...

 

 

1939 film by Walter Lang, William A. Seiter The Little PrincessTheatrical release posterDirected byWalter LangScreenplay byEthel HillWalter FerrisBased onA Little Princess1905 novelby Frances Hodgson BurnettProduced byDarryl F. ZanuckGene MarkeyStarringShirley TempleRichard GreeneAnita LouiseIan HunterArthur TreacherCesar RomeroCinematographyArthur C. MillerWilliam SkallEdited byLouis LoefflerMusic byCharles MaxwellCyril J. MockridgeHerbert W. SpencerSamuel PokrassDistributed byTwentieth Cent...

Экономика Бразилии Фондовая биржа Сан-Паулу Валюта реал (BRL, R$) Фискальный год календарный год Международныеорганизации UNASUR, ВТО, Меркосур, G-20 и др. Статистика ВВП $2,023 трлн[1] Место по ВВП 8 Рост ВВП 1,8 % (2017)[2] ВВП на душу населения $11,220 (2009) (номинальный)[1]$11,514 (2009...

 

 

Organization Council of Higher Secondary Education, OdishaFormation23 October 1982; 41 years ago (1982-10-23)TypeState Governmental Board of Higher Secondary EducationHeadquartersPrajnapitha, Samantapur, Bhubaneshwar, Odisha, IndiaLocationPuriOfficial language Odia and EnglishParent organisationDepartment of School and Mass Education, Government of OdishaWebsitewww.chseodisha.nic.in Council of Higher Secondary Education, Odisha (abbreviated as CHSE (O)) is a Board of Educati...

 

 

SarimiJenis produkMi instanPemilikIndofood CBPNegara IndonesiaDiluncurkan1982Pemilik sebelumnyaPT Sarimi Asli Jaya (1982-1994) PT Indofood Sukses Makmur Tbk (1994-2009)Situs webwww.sarimi.co.id Sarimi adalah merek mi instan di Indonesia yang diproduksi oleh Indofood CBP Sukses Makmur. Merek ini diluncurkan pada tahun 1982, empat belas tahun setelah Supermi dan sepuluh tahun setelah Indomie. Sejarah Produk ini merupakan merek mi instan pertama yang dimiliki dan diluncurkan oleh Salim Grou...

Voce principale: Associazione Sportiva Roma. AS RomaStagione 1930-1931Sport calcio Squadra Roma Allenatore Herbert Burgess Presidente Renato Sacerdoti Serie A2º (in Coppa dell'Europa Centrale) Maggiori presenzeCampionato: Fasanelli, Costantino, Ferraris IV (34) Miglior marcatoreCampionato: Volk (28) StadioCampo Testaccio 1929-1930 1931-1932 Si invita a seguire il modello di voce Questa voce raccoglie le informazioni riguardanti l'Associazione Sportiva Roma nelle competizioni uffici...

 

 

AwardROTC Medal for HeroismTypeMedalAwarded forROTC cadets who distinguish themselves by acts of heroism performed on or off campus. Act must result in accomplishment so exceptional / outstanding as to set cadet apart from others in similar circumstances and must involve acceptance of danger or extraordinary responsibilities exemplifying praiseworthy fortitude and courage.[1]Presented byUnited States ArmyEligibilityROTC CadetsStatusCurrently AwardedROTC Medal for Heroism Ribbon Preced...

 

 

صاحب السمو الأمير خالد بن يزيد بن عبد الله بن عبد الرحمن آل سعود معلومات شخصية تاريخ الميلاد سنة 1950   الوفاة 31 يوليو 2011الرياض، المملكة العربية السعودية مواطنة السعودية  الأولاد الأميرة نورة الأب يزيد بن عبد الله بن عبدالرحمن آل سعود الأم نورة الثانية بنت عبد العزيز آل...

Військово-музичне управління Збройних сил України Тип військове формуванняЗасновано 1992Країна  Україна Емблема управління Військово-музичне управління Збройних сил України — структурний підрозділ Генерального штабу Збройних сил України призначений для планува...

 

 

Academic journalJournal of the British Interplanetary SocietyDisciplineAstronautics, space flight, astrophysicsLanguageEnglishEdited byDave SaltPublication detailsHistory1934–presentPublisherBritish Interplanetary Society (United Kingdom)FrequencyMonthlyStandard abbreviationsISO 4 (alt) · Bluebook (alt1 · alt2)NLM (alt) · MathSciNet (alt )ISO 4J. Br. Interplanet. Soc.IndexingCODEN (alt · alt2) · JSTOR (alt) ...

 

 

LighthouseRödkallen South lighthouseRödkallen Södra LocationRödkallen, Luleå Municipality, Sweden Coordinates65°18′51″N 22°22′11″E / 65.31411°N 22.36975°E / 65.31411; 22.36975TowerConstructed1966 FoundationconcreteConstructionmasonry 5-storey buildingHeight18 metres (59 ft)Shapebuilding with lantern on the roofMarkingsyellow, red, white (lantern) OperatorSwedish Maritime Administration (Sjöfartsverket)[1]LightFocal height22&...

The Temple of the Tooth in Kandy, Sri Lanka, is an example of traditional Sri Lankan architecture The architecture of Sri Lanka displays a rich variety of architectural forms and styles. Shaivism has had a significant influence on early Sri Lankan architecture, during the reign of King Ravana, then Buddhism has also had a significant influence on Sri Lankan architecture, since it was introduced to the island in the 3rd century BCE.[1] Traditionally, Indian and Chinese architecture hav...

 

 

English politician and historian (1609–1674) The Right HonourableThe Earl of ClarendonJP PCPortrait by Peter LelyFirst Lord of the TreasuryIn office19 June 1660 – 8 September 1660MonarchCharles II of EnglandPreceded byThe Lord Cottington(Lord High Treasurer)Succeeded byThomas Wriothesley, 4th Earl of SouthamptonLord ChancellorIn office1660–1667Preceded byVacant (last held by Sir Edward Herbert)Succeeded byOrlando BridgemanChancellor, University of OxfordIn office1660–1667...

 

 

Belgian lambic beer This article is about the beer style. For the distilled drink, see Himbeergeist. For the settlement in Canada, see Framboise, Nova Scotia. This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Framboise – news · newspapers · books · scholar · JSTOR (March 2013) (Learn how and when to remove thi...

Wales international rugby league footballer For other rugby league and rugby union footballers of this name, see Rhys Williams (disambiguation). Rhys Drags WilliamsPersonal informationFull nameRhys WilliamsBorn (1989-12-08) 8 December 1989 (age 34)Mynydd Isa, Flintshire, WalesHeight5 ft 10 in (1.78 m)Weight15 st 8 lb (99 kg)Playing informationPositionWing, Centre Club Years Team Pld T G FG P 2010–13 Warrington Wolves 29 21 0 0 84 2011(loan) → Cr...

 

 

Group of baseball parks in the New York City borough of Brooklyn This article is about the baseball stadiums in Brooklyn, New York. For the stadium in Indianapolis, see Washington Park (Indianapolis). For the stadium in Los Angeles, see Washington Park (Los Angeles). Washington ParkEntrance to the second incarnation of Washington Park, 1911Washington ParkLocation in New York CityShow map of New York CityWashington ParkLocation within the State of New YorkShow map of New YorkWashington ParkLoc...