Skip to content

Commit

Permalink
Grew buttons on requests
Browse files Browse the repository at this point in the history
  • Loading branch information
bguil committed Dec 16, 2023
1 parent f9dd14e commit 3118214
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@ bookToc: true

The `comp:pred` relation is used for predicative arguments introduced by a copula or a verb.

```grew
{{< grew >}}
pattern { GOV -[comp:pred]-> DEP }
```
{{< /grew >}}

### predicative arguments of copula

```grew
pattern { GOV -[comp:pred]-> DEP; GOV [upos=AUX] }
```
{{< grew >}}
pattern {
GOV -[comp:pred]-> DEP;
GOV [upos=AUX]
}
{{< /grew >}}


> **English** `comp:pred` introduced by the copula *to be*
{{< conll >}}
1 I I PRON _ _ 2 subj _ _
Expand All @@ -43,9 +48,9 @@ pattern { GOV -[comp:pred]-> DEP; GOV [upos=AUX] }

### `comp:pred` introduced by a verb

```grew
{{< grew >}}
pattern { GOV -[comp:pred]-> DEP; GOV [upos=VERB] }
```
{{< /grew >}}

> **English**
{{< conll >}}
Expand Down Expand Up @@ -96,9 +101,9 @@ pattern { GOV -[comp:pred]-> DEP; GOV [upos=VERB] }

### `comp:pred` for predication of the object

```grew
{{< grew >}}
pattern { GOV -[comp:pred]-> DEP; GOV -[comp:obj]-> OBJ }
```
{{< /grew >}}

> **English**
{{< conll >}}
Expand Down Expand Up @@ -140,9 +145,10 @@ pattern { GOV -[comp:pred]-> DEP; GOV -[comp:obj]-> OBJ }
### subordinating constructions
The `comp:pred` relation can also be used in some subordinating constructions.

```grew
{{< grew >}}
pattern { GOV -[comp:pred]-> DEP; DEP[upos=SCONJ] }
```
{{< /grew >}}



> **English**
Expand Down
3 changes: 3 additions & 0 deletions layouts/partials/docs/inject/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/prism.css">
<script src="{{ .Site.BaseURL }}js/prism.js"></script>
<script src="{{ .Site.BaseURL }}js/prism_grew.js"></script>

<link rel="stylesheet" href="{{ .Site.BaseURL }}css/guidelines.css">
<script src="{{ .Site.BaseURL }}js/guidelines.js"></script>
7 changes: 6 additions & 1 deletion layouts/shortcodes/grew.html
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
<pre><code class="language-grew">{{.Inner}}</code></pre>
<div style="position: relative;">
<pre><code class="language-grew">{{ trim .Inner "\n\r" }}</code></pre>
<button class="btn-clipboard" onclick="grew_match_search({{ trim .Inner "\n\r" }})">
<img src="{{ .Site.BaseURL }}/images/square_g.svg" alt="Grew-match" width="18" height="18">
</button>
</div>
13 changes: 13 additions & 0 deletions static/css/guidelines.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.btn-clipboard {
position: absolute;
top: .45rem;
right: .45rem;
z-index: 10;
display: block;
padding: .25rem .5rem;
font-size: .65em;
color: #13902e;
background-color: #ffffff;
border: 1px solid;
border-radius: .25rem;
}
6 changes: 6 additions & 0 deletions static/js/guidelines.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
let treebank = "SUD_French-GSD@latest"

function grew_match_search(msg) {
let url = "https://universal.grew.fr?corpus="+treebank+"&request="+msg
window.open(encodeURI(url));
}

0 comments on commit 3118214

Please sign in to comment.