wwui/docs/codox/wwui.propositions.html

9 lines
10 KiB
HTML

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>wwui.propositions documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Wwui</span> <span class="project-version">0.1.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="intro.html"><div class="inner"><span>Introduction to wwui</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>wwui</span></div></div></li><li class="depth-2 branch"><a href="wwui.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 current"><a href="wwui.propositions.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>propositions</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="wwui.propositions.html#var-coll-or-nil.3F"><div class="inner"><span>coll-or-nil?</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-get-sentences"><div class="inner"><span>get-sentences</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-grammar"><div class="inner"><span>grammar</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-identify"><div class="inner"><span>identify</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-name-find"><div class="inner"><span>name-find</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-normalise"><div class="inner"><span>normalise</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-pos-tag"><div class="inner"><span>pos-tag</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-propositions"><div class="inner"><span>propositions</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-propositions-from-file"><div class="inner"><span>propositions-from-file</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-rdp-extend"><div class="inner"><span>rdp-extend</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-rdp-seek"><div class="inner"><span>rdp-seek</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-reparse"><div class="inner"><span>reparse</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-tag"><div class="inner"><span>tag</span></div></a></li><li class="depth-1"><a href="wwui.propositions.html#var-tokenize"><div class="inner"><span>tokenize</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">wwui.propositions</h1><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="public anchor" id="var-coll-or-nil.3F"><h3>coll-or-nil?</h3><h4 class="type">macro</h4><div class="usage"><code>(coll-or-nil? o)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L100">view source</a></div></div><div class="public anchor" id="var-get-sentences"><h3>get-sentences</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L13">view source</a></div></div><div class="public anchor" id="var-grammar"><h3>grammar</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The objective of this grammar is to allow us to take a sequence of tagged symbols, and produce a higher-level tagging of parts of speech, and ultimately propositions, from them.</p>
<p><em>NOTE THAT</em> tags in this grammar are always keywords, to distinguish them from OpenNLP tags, which tag individual tokens and are represented as strings.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L19">view source</a></div></div><div class="public anchor" id="var-identify"><h3>identify</h3><div class="usage"><code>(identify parse-tree knowledge-accessor)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L154">view source</a></div></div><div class="public anchor" id="var-name-find"><h3>name-find</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L16">view source</a></div></div><div class="public anchor" id="var-normalise"><h3>normalise</h3><div class="usage"><code>(normalise parse-tree ka)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L161">view source</a></div></div><div class="public anchor" id="var-pos-tag"><h3>pos-tag</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L15">view source</a></div></div><div class="public anchor" id="var-propositions"><h3>propositions</h3><div class="usage"><code>(propositions tagged-sentence)</code><code>(propositions tagged-sentence knowledge-accessor)</code></div><div class="doc"><div class="markdown"><p>Given a <code>tagged-sentence</code>, return a list of propositions detected in that sentence; if <code>knowledge-accessor</code> is passed, try to resolve names and noun phrases to entities known to that knowledge accessor.</p>
<p>TODO: Note that if <code>:subject</code>, <code>:object</code> or <code>:locator</code> resolves to multiple objects, then that is essentially one proposition for each unique combination. This is not yet implemented!</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L194">view source</a></div></div><div class="public anchor" id="var-propositions-from-file"><h3>propositions-from-file</h3><div class="usage"><code>(propositions-from-file file-path)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L215">view source</a></div></div><div class="public anchor" id="var-rdp-extend"><h3>rdp-extend</h3><div class="usage"><code>(rdp-extend tagged-sentence grammar goal)</code></div><div class="doc"><div class="markdown"><p>Seek a phrase which satisfies this <code>goal</code> (expected to be a collection of tags) in this <code>tagged-sentence</code> using this <code>grammar</code>.</p>
<p>Return a cons comprising 1. the first matching phrase for the goal, or <code>nil</code> if no match; 2. the tail of the sentence when the parts comprising the phrase are removed.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L105">view source</a></div></div><div class="public anchor" id="var-rdp-seek"><h3>rdp-seek</h3><div class="usage"><code>(rdp-seek tagged-sentence grammar goal)</code></div><div class="doc"><div class="markdown"><p>Seek a phrase which satisfies this <code>goal</code> (expected to be a keyword) in this <code>tagged-sentence</code> using this <code>grammar</code>.</p>
<p>Return a cons comprising 1. the first matching phrase for the goal, tagged with the goal, or <code>nil</code> if no match; 2. the tail of the sentence when the parts comprising the phrase are removed.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L72">view source</a></div></div><div class="public anchor" id="var-reparse"><h3>reparse</h3><div class="usage"><code>(reparse tagged-sentence grammar goal)</code></div><div class="doc"><div class="markdown"><p>Reparse this <code>tagged-sentence</code> using this grammar to seek this <code>goal</code>. Parse greedily, seeking the most extended goal.</p>
<p>Return a sequence comprising 1. the first matching phrase for the goal, tagged with the goal, or <code>nil</code> if no match; 2. the tail of the sentence when the parts comprising the phrase are removed.</p>
<p>This function is called <code>reparse</code> because: 1. it is designed to parse sentences which have already been parsed by OpenNLP: it will not work on raw sentences; 2. it is a recursive descent parser.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L130">view source</a></div></div><div class="public anchor" id="var-tag"><h3>tag</h3><h4 class="type">macro</h4><div class="usage"><code>(tag tagged-token)</code></div><div class="doc"><div class="markdown"><p>The tag, on a <code>tagged-token</code>, is just the second element. Written as a macro for readability.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L94">view source</a></div></div><div class="public anchor" id="var-tokenize"><h3>tokenize</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/wwui/blob/master/src/wwui/propositions.clj#L14">view source</a></div></div></div></body></html>