Docsity

Implementing Word Prediction Algorithms using ConceptNet in Lisp, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
Probability and Probabilistic Language
Processing
Due: Nov. 16 11:00am
1. Introduction
ConceptNet is a freely available commonsense knowledgebase and natural language
processing toolkit which supports many practical textual-reasoning tasks over
real-world documents right out-of-the-box (without additional statistical training). See
more information from its official website:
http://web.media.mit.edu/~hugo/conceptnet/
In this project you are required to implement several algorithms that predict the word
the user is typing. These algorithms can be used in word completion interface to
reduce the effort needed to type a word. Name your lisp file to “<gt_account>.lisp”
and submit it in the webwork.
2. Loading the Package
There is a package with this assignment, which include the necessary files to
implement the following sections. Extract all the files to your working directory.
In the working directory, run the following commands in the alisp console to load
ConceptNet:
Now you can see what ConceptNet can do for us:
You can also download Python package from the official website. It has a GUI
(load "aserve-1.2.37/load.cl")
(load "defsys.cl")
(load-omd)
(in-package :omcsnet)
(read-omcsnet "data/predicates.txt")
(print-paths (find-shortest-paths "wedding" "cake"))
(print-analogies (find-analogous-concepts "wedding"))
(print-context (get-context "wedding"))
pf3

Partial preview of the text

Download Implementing Word Prediction Algorithms using ConceptNet in Lisp and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

Probability and Probabilistic Language

Processing

Due: Nov. 16 11:00am

1. Introduction

ConceptNet is a freely available commonsense knowledgebase and natural language processing toolkit which supports many practical textual-reasoning tasks over real-world documents right out-of-the-box (without additional statistical training). See more information from its official website: http://web.media.mit.edu/~hugo/conceptnet/

In this project you are required to implement several algorithms that predict the word the user is typing. These algorithms can be used in word completion interface to reduce the effort needed to type a word. Name your lisp file to “<gt_account>.lisp” and submit it in the webwork.

2. Loading the Package

There is a package with this assignment, which include the necessary files to implement the following sections. Extract all the files to your working directory.

In the working directory, run the following commands in the alisp console to load ConceptNet:

Now you can see what ConceptNet can do for us:

You can also download Python package from the official website. It has a GUI

(load "aserve-1.2.37/load.cl") (load "defsys.cl") (load-omd) (in-package :omcsnet) (read-omcsnet "data/predicates.txt")

(print-paths (find-shortest-paths "wedding" "cake")) (print-analogies (find-analogous-concepts "wedding")) (print-context (get-context "wedding"))

interface that allows you to explore the ConceptNet knowledge base. Of course, you still have to use lisp to develop in the following sections.

3. Parsing the Word Dictionary

The file “english-words.10.dict” is an English word dictionary. You should implement a function to parse this dictionary and return the candidates which start with specific prefix:

For example:

3.1 Deliverables

The getWordFromDict function.

4. Sort the Result Using Frequency

The file “frequency.txt” contains frequency information about the different words. You should implement a function to sort the previous result according to their frequency:

For example:

4.1 Deliverables

The sortFromFrequency function.

5. Sort the Result according to ConceptNet

You should use ConceptNet to re-sort the previous results in this section. Specifically, there is a function “getHistory” in “typist.lisp” you can use to retrieve the information the user has inputted:

(defun getWordFromDict (prefix) …)

(getWordFromDict "absolu") Î (“absolute” “absolutely”)

(defun sortFromFrequency(strlist) …)

(sortFromFrequency (list “absolutely” “absolute”)) Î (“absolute” “absolutely”)

(getHistory) Î “Hello! …”