26.12.2013 Views

A computational grammar and lexicon for Maltese

A computational grammar and lexicon for Maltese

A computational grammar and lexicon for Maltese

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.2.2 Web application<br />

CakePHP framework<br />

CakePHP 7 is an open-source web development framework written in PHP. It uses a MVC<br />

(model-view-controller) architecture to cleanly separate data, business logic <strong>and</strong> user interface.<br />

The framework is typically used with relational databases, however a data source implementation<br />

exists which allows it to be used with MongoDB 8 .<br />

User interface<br />

Browsing Figures 3.2 <strong>and</strong> 3.3 show screenshots of the online <strong>lexicon</strong> application. The <strong>for</strong>mer<br />

shows how one can browse <strong>and</strong> search by root <strong>and</strong> derivational <strong>for</strong>m, which aims to replicate<br />

the same interface as in the online database of root <strong>and</strong> pattern verbs (Camilleri & Spagnol,<br />

2013). The latter is an example of searching through the lexeme entries, which is the primary<br />

way in which a <strong>lexicon</strong> is usually used. Figure 3.4 shows the detail page <strong>for</strong> a single entry,<br />

where all the word<strong>for</strong>ms <strong>for</strong> that lexeme are displayed <strong>and</strong> can be filtered.<br />

Figure 3.2: Searching <strong>for</strong> a root by regular expression in the computation <strong>lexicon</strong><br />

Searching<br />

All search terms in the application are treated as regular expressions. A regex<br />

helper interface is provided on roots page to help users unfamiliar with regex syntax (shown<br />

being used in figure 3.2). In order to prevent against slow database queries, the beginning<br />

of string anchor ^ is inserted automatically be<strong>for</strong>e all queries. This a merely a user-interface<br />

7 http://cakephp.org, accessed 2013-09-03<br />

8 https://github.com/ichikaway/cakephp-mongodb/, accessed 2013-09-03<br />

53

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!