Skip to content

Commit

Permalink
Issue 74
Browse files Browse the repository at this point in the history
  • Loading branch information
bpgergo committed Jan 15, 2012
1 parent 2876ac6 commit d66c522
Show file tree
Hide file tree
Showing 7 changed files with 198 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/main/resources/META-INF/spring/log4j.properties
@@ -1,7 +1,8 @@
#Updated at Wed Mar 10 23:14:31 CET 2010
#Wed Mar 10 23:14:31 CET 2010
log4j.appender.sysout=org.apache.log4j.ConsoleAppender
log4j.rootLogger=INFO, sysout
#log4j.rootLogger=INFO, sysout
log4j.rootLogger=DEBUG, sysout
log4j.appender.A1.File=hunglishwebapp.log
log4j.appender.A1.MaxFileSize=100KB
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
Expand Down
26 changes: 16 additions & 10 deletions src/main/webapp/WEB-INF/views/index.jspx
@@ -1,3 +1,4 @@

<div>
Kedves Hunglish Mondattár Felhasználók,
<p>
Expand All @@ -22,19 +23,10 @@ Fontos linkek:
<ul>
<li><a href="${form_url}/search">Keresés</a></li>
<li><a href="${form_url}/upload/form">Dokumentumpárok feltöltése</a></li>
<li><a
href="http://www.facebook.com/Hunglish.Mondattar">A
Hunglish Mondattár Facebook
oldala.</a></li>

<br />
A Like gombbal jelezhetik, ha hasznosnak találták akár a régi, akár az új Mondattárat!
<li><a href="${form_url}/static/html/syntax.html">The search syntax (angolul)</a></li>
</ul>
</p>
<p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2FHunglish.Mondattar&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="overflow:hidden; height:70px; margin-left:0px; " allowTransparency="true"></iframe>
</p>
<p>
Az új rendszer tesztüzemben fut, és folyamatos fejlesztés alatt áll.
A felhasználói felület designja például még teljesen ideiglenes, de sokminden más is drasztikusan változni fog.
Ennek ellenére mi már most meg szeretnénk kérni Önöket, hogy látogassanak át az új rendszerhez,
Expand Down Expand Up @@ -63,4 +55,18 @@ Az alábbiaknak különösen hálásak vagyunk segítségükért:
Balogh Attila, Both Zsolt, Farkas András, Halácsy Péter (az eredeti rendszer fejlesztője),
Kornai András, Rung András, Váradi Tamás, Zséder Attila
</p>


<a
href="http://www.facebook.com/Hunglish.Mondattar">A
Hunglish Mondattár Facebook
oldala.</a>

<br />
A Like gombbal jelezhetik, ha hasznosnak találták akár a régi, akár az új Mondattárat!

<p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2FHunglish.Mondattar&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="overflow:hidden; height:70px; margin-left:0px; " allowTransparency="true"></iframe>
</p>

</div>
72 changes: 72 additions & 0 deletions src/main/webapp/html/syntax.html
@@ -0,0 +1,72 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
Hunglish corpus search syntax
</title>
<link rel="stylesheet" href="/static/styles/syntax.css" type="text/css">
</head>
<body>
<p>
<a href="http://mokk.bme.hu"><img src="http://szotar.mokk.bme.hu/hunglish/mokk-logo.gif"/></a>
<a href="http://www.nytud.hu"><img src="http://szotar.mokk.bme.hu/hunglish/nytud-logo.gif"/></a>
</p>

<h1>
Search syntax
</h1>

<p>You can set any number of space-separated query phrases on the Hungarian or the English side, or even both sides at once.
</p>

<p>The syntax of these query phrases is easiest to describe through a series of examples:
</p>

<p>The simplest example of a query phrases is a word: The Hungarian side <code>ellopták</code> query results in bisentences with
this Hungarian word in their Hungarian sentence. Other inflected forms (<code>ellopnám</code>, <code>ellopott</code>) are also returned as results, but are ranked lower than the exactly matching version.
</p>
<p>

To prohibit results with other inflected forms, the term should be surrounded with the &lt; &gt; parentheses. So <code>&lt;ellopták&gt;</code>
will not give results with only, say, <code>ellopott</code> in them. This is called an <i>exact match</i> query.
</p>

<p>
One can search for <i>multi-word</i> search terms. The three equivalent ways of doing this are:
<ol>
<li>Quotation: <code>"back to normal"</code>.</li>
<li>Dashes: <code>back-to-normal</code>. </li>
<li>Dots: <code>back.to.normal</code> .</li>
</ol>
</p>

<p>
One can mix the exact match syntax with multi-word search terms, but mixing parentheses and quotation signs (<code>&lt;"back to normal"&gt;</code>) is not allowed. So the exact match versions of the previous examples would look like this: <code>&lt;back to normal&gt;</code>
<code>&lt;back-to-normal&gt;</code> <code>&lt;back.to.normal&gt;</code>.
</p>

<p>
Any query phrase is allowed to have one of the following two modifiers as prefixes. Space is not allowed between the modifier and its modifyee.


<ul>
<li>
The <i>Prohibited</i> modifier (minus sign) negates the query phrase. So, for example Hungarian:
<code>fél</code> English: <code>-scared</code> returns bisentences where there is a word in
the Hungarian sentence which stems the same as "fél", but there is NO word in the English
sentence which stems the same as "scared".
The Prohibited modifier can be combined with exact match syntax and multi-word search terms,
e.g. English: <code>scare -<scared></code> and <code>-<don't know></code> are valid queries.
</li>

<li>
The <i>Required</i> modifier (plus sign) requires that the term after the "+" symbol exist somewhere in the sentence. Without any modifier
the phrase is optional. So, for example English <code> buy into </code> return bisentences where the words <code>buy</code> OR <code>into</code> but the query <code> +buy +into</code> returns only bisentences with the two words in it.
</li>
</ul>

<p>

The query syntax is designed so that simple queries have straightforward syntax, but quite complex queries are manageable, too. Some users might need even more advanced queries, like nested ones, or complex filtering of document sources. For these users we plan to provide direct access to the internal query language, but the syntax for this is quite complex and nonintuitive.
</p>
</html>
Binary file modified src/main/webapp/images/favicon.ico
Binary file not shown.
Binary file added src/main/webapp/images/nytud-logo.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/main/webapp/styles/standard.css
Expand Up @@ -8,9 +8,9 @@ body,div,td {

body {
background-color: #fff;
background-image: url(../images/logo.jpg);
background-image: url(../images/logo.jpg); /*url(../images/nytud-logo.gif);*/
background-position: top center;
background-repeat: no-repeat;
background-repeat: no-repeat;
text-align: center;
}

Expand Down
106 changes: 106 additions & 0 deletions src/main/webapp/styles/syntax.css
@@ -0,0 +1,106 @@
img {
border: 0px;
}
form {
border: none;
margin: 0;
}

textarea {
font: 110% "Courier New", Courier, monospace;
border: 1px solid #8cacbb;
color: Black;
background-color: white;
width: 100%;
}
input {
font-family: "Verdana, Geneva, Arial, Helvetica, sans-serif;
visibility: visible;
border: 1px solid #8cacbb;
color: Black;
background-color: white;
vertical-align: middle;
}
select {
border: 1px solid #8cacbb;
color: Black;
background-color: White;
vertical-align: top;
}

a:link {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-style : normal;
text-decoration : none;
color: #336699;
}

a:visited {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
text-decoration : none;
color: #336699;
}

a:hover {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
text-decoration : none;
color: #000000;

}

a:active {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
text-decoration : underline;
}

a:focus {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
text-decoration : underline;
}

body {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 12px;
margin-bottom : 6px;
margin-left : 6px;
margin-right : 6px;
margin-top : 6px;
width: 800px;
}

.senttable {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size : 12px;
list-style-type : circle;
margin-bottom : 6px;
margin-left : 0px;
margin-right : 0px;
margin-top : 12px;
}

.senttable .odd {
/*every second line should be shaded */
background-color: transparent;
}
.senttable .even {
background-color: #f7f9fa;
border-bottom: 1px solid #8cacbb;
}

.result td,
table td
{
border-bottom: 1px solid #8cacbb;
padding: 0.5em 1em;
text-align: left;
}

.notlast {
border-right: 1px solid #8cacbb;
}
div.pager {
margin-top: 6px;
font-size : 12px;
text-align: center;

}

0 comments on commit d66c522

Please sign in to comment.