• 沒有找到結果。

第三章、 系統設計

3.3 前置處理

我們必須先對 DUC 資料集中的每一篇文章做一些前置處理的動作,才可更 準確地將文章投影到向量空間中。我們分別對文章做了斷句處理、雜訊移除處理

、詞性標記處理、字詞還原處理、同義詞合併處理和常用字詞移除處理。

對文章做斷句處理是以句點、驚嘆號、問號、分號等標點符號做為斷句的依 據。 我們不以逗點作為斷句的依據是因為希望產生的系統摘要能具有流暢性。

對文章做雜訊移除處理是因為 DUC 資料集的文章中包含一些無意義但頻繁 出現的字詞,例如:&QL、&UR、&LR 等。 為了避免這些雜訊影響其向量空間 的建立,故我們收集並統計此類的雜訊,並在此前置處理時就將之移除。

剩下的前置處理部分我們將以下列四個小節做詳細的介紹。

3.3.1 詞性標記處理

我們希望將文章中的每個字詞都標記其詞性,以方便我們做後續挑選字詞為 動詞、名詞的處理。 我們使用的剖析工具為由Stanford Nature Language Processing Group所研發的Stanford Parser [ 31 ],其為一種機率統計模型的詞 性剖析程式。

而Stanford Parser的輸出結果包含詞性標記、語法結構和語法依存關係。因 為我們不需要使用語法依存關係,所以在此省略不介紹。 其中詞性標記的輸出 結果是我們較感興趣的部分。

下面為Stanford Parser的實例:

Input

There was good news Wednesday from the world‘s weather

forecasters: the massive disruptions caused by El Nino are coming to an end.

24

Output (詞性標記)

There/EX was/VBD good/JJ news/NN Wednesday/NNP from/IN the/DT world/NN `/`` s/JJ weather/NN forecasters/NNS :/: the/DT massive/JJ disruptions/NNS caused/VBN by/IN El/NNP Nino/NNP are/VBP

coming/VBG to/TO an/DT end/NN ./.

Output (語法結構)

3.3.1-1 Stanford Parser 的實例

因為名詞與動詞是在所有詞性中較為有資訊量的詞性,所以我們可利用此詞 性標記結果來擷取出名詞與動詞的字詞,並只利用這些字詞來建立文件的向量空 間模型,以達到降低向量空間模型維度的效果。

25

3.3.2 字詞還原處理

我們希望將文章中的每一個字詞作正規化處理,意即將意義相同但其單複數

、型態、詞性不相同的字詞全部還原成其原型,使得在作字詞統計的處理時能夠 更加地正確。 例如:將 connected、connecting、connection、connections 全部 還原成connect。

下面為Porter Stemmer 的實例:

Input

There was good news Wednesday from the world‘s weather

forecasters: the massive disruptions caused by El Nino are coming to an end.

Output

There wa good new Wednesdai from the world weather forecast the massiv disrupt caus by El Nino ar come to an end

3.3.2-2 Porter Stemmer 的實例

There was good news Wednesday from the world‘s weather

forecasters: the massive disruptions caused by El Nino are coming to an end.

Output

字詞 詞性 詞性所相對應的同義詞集合

There Adverb thither

27

good Noun commodity trade_good goodness

Adjective

undecomposed unspoiled unspoilt honest salutary sound serious effective in_effect in_force well right ripe dependable safe secure dear near adept expert practiced proficient skillful skilful just upright beneficial estimable honorable respectable full

Adverb thoroughly soundly well

news Noun newsworthiness intelligence tidings word Wednesday Noun Midweek Wed

world

Noun

human_race humanity humankind humans mankind man worldly_concern earthly_concern populace public globe reality domain universe existence creation cosmos macrocosm

Adjective global planetary worldwide world-wide weather

Noun weather_condition conditions atmospheric_condition

Verb endure brave brave_out Adjective upwind

massive Adjective monolithic monumental by Adverb aside away past

El Noun elevated_railway elevated_railroad elevated overhead_railway elevation altitude ALT coming

Noun orgasm climax sexual_climax approach approaching advent

Adjective approaching forthcoming upcoming end

Noun

remainder remnant oddment conclusion close closing ending destruction death goal last final_stage terminal

Verb terminate stop finish cease 表3.3.3-1 Wordnet Synsets 的實例

此時,我們將這些同義詞合併成同一維度,以降低向量空間模型的維度。

28

3.3.4 常用字詞移除處理

在閱讀文章時,會常常看到某些常用字詞,這些常用字詞通常都不帶有任何 重要的意義。 因此我們希望可以將這些常用字詞移除,以避免這些常用字詞影 響相似度的計算及減少向量空間的維度。

我們使用的工具為 DUC 資料集所提供的常用字詞列表,其列表如下:

3.3.4-1 常用字詞列表 下面為移除常用字詞且執行字詞還原過程的實例:

Input

There was good news Wednesday from the world‘s weather

forecasters: the massive disruptions caused by El Nino are coming to an end.

Output

good wednesdai world weather forecast massiv disrupt el nino come end

3.3.4-2 移除常用字和執行字詞還原過程的實例

以上就是我們對 DUC 資料集中的所有文件所作的前置處理動作。 此時,

我們可以將文件投影至向量空間模型中,而且跟沒作前置處理動作時所建立的向 量空間模型相比,必定會更加符合這些文件的語意資訊。

29

相關文件