Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Update const. parsing docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Huffon committed Feb 3, 2021
1 parent 6e90aa1 commit dafd29f
Show file tree
Hide file tree
Showing 9 changed files with 114 additions and 4 deletions.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/seq2seq/const.doctree
Binary file not shown.
22 changes: 22 additions & 0 deletions docs/_build/html/_modules/pororo/tasks/constituency_parsing.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,28 @@ <h1>Source code for pororo.tasks.constituency_parsing</h1><div class="highlight"
<span class="sd"> result: result of constituency parsing</span>

<span class="sd"> Examples:</span>
<span class="sd"> &gt;&gt;&gt; const = Pororo(task=&quot;const&quot;, lang=&quot;en&quot;)</span>
<span class="sd"> &gt;&gt;&gt; const(&quot;I love this place&quot;)</span>
<span class="sd"> &lt;TOP&gt;</span>
<span class="sd"> &lt;S&gt;</span>
<span class="sd"> &lt;NP&gt;I&lt;/NP&gt;</span>
<span class="sd"> &lt;VP&gt;</span>
<span class="sd"> love</span>
<span class="sd"> &lt;NP&gt;this place&lt;/NP&gt;</span>
<span class="sd"> &lt;/VP&gt;</span>
<span class="sd"> &lt;/S&gt;</span>
<span class="sd"> &lt;/TOP&gt;</span>
<span class="sd"> &gt;&gt;&gt; const = Pororo(task=&quot;const&quot;, lang=&quot;zh&quot;)</span>
<span class="sd"> &gt;&gt;&gt; const(&quot;我喜欢饼干&quot;)</span>
<span class="sd"> &lt;TOP&gt;</span>
<span class="sd"> &lt;IP&gt;</span>
<span class="sd"> &lt;NP&gt;我&lt;/NP&gt;</span>
<span class="sd"> &lt;VP&gt;</span>
<span class="sd"> 喜欢</span>
<span class="sd"> &lt;NP&gt;饼干&lt;/NP&gt;</span>
<span class="sd"> &lt;/VP&gt;</span>
<span class="sd"> &lt;/IP&gt;</span>
<span class="sd"> &lt;/TOP&gt;</span>
<span class="sd"> &gt;&gt;&gt; const = Pororo(task=&quot;const&quot;, lang=&quot;ko&quot;)</span>
<span class="sd"> &gt;&gt;&gt; const(&quot;미국에서도 같은 우려가 나오고 있다.&quot;)</span>
<span class="sd"> &lt;S&gt;</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Large diffs are not rendered by default.

24 changes: 23 additions & 1 deletion docs/_build/html/seq2seq/const.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,29 @@
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">const</span> <span class="o">=</span> <span class="n">Pororo</span><span class="p">(</span><span class="n">task</span><span class="o">=</span><span class="s2">&quot;const&quot;</span><span class="p">,</span> <span class="n">lang</span><span class="o">=</span><span class="s2">&quot;ko&quot;</span><span class="p">)</span>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">const</span> <span class="o">=</span> <span class="n">Pororo</span><span class="p">(</span><span class="n">task</span><span class="o">=</span><span class="s2">&quot;const&quot;</span><span class="p">,</span> <span class="n">lang</span><span class="o">=</span><span class="s2">&quot;en&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">const</span><span class="p">(</span><span class="s2">&quot;I love this place&quot;</span><span class="p">)</span>
<span class="go">&lt;TOP&gt;</span>
<span class="go"> &lt;S&gt;</span>
<span class="go"> &lt;NP&gt;I&lt;/NP&gt;</span>
<span class="go"> &lt;VP&gt;</span>
<span class="go"> love</span>
<span class="go"> &lt;NP&gt;this place&lt;/NP&gt;</span>
<span class="go"> &lt;/VP&gt;</span>
<span class="go"> &lt;/S&gt;</span>
<span class="go">&lt;/TOP&gt;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">const</span> <span class="o">=</span> <span class="n">Pororo</span><span class="p">(</span><span class="n">task</span><span class="o">=</span><span class="s2">&quot;const&quot;</span><span class="p">,</span> <span class="n">lang</span><span class="o">=</span><span class="s2">&quot;zh&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">const</span><span class="p">(</span><span class="s2">&quot;我喜欢饼干&quot;</span><span class="p">)</span>
<span class="go">&lt;TOP&gt;</span>
<span class="go"> &lt;IP&gt;</span>
<span class="go"> &lt;NP&gt;我&lt;/NP&gt;</span>
<span class="go"> &lt;VP&gt;</span>
<span class="go"> 喜欢</span>
<span class="go"> &lt;NP&gt;饼干&lt;/NP&gt;</span>
<span class="go"> &lt;/VP&gt;</span>
<span class="go"> &lt;/IP&gt;</span>
<span class="go">&lt;/TOP&gt;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">const</span> <span class="o">=</span> <span class="n">Pororo</span><span class="p">(</span><span class="n">task</span><span class="o">=</span><span class="s2">&quot;const&quot;</span><span class="p">,</span> <span class="n">lang</span><span class="o">=</span><span class="s2">&quot;ko&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">const</span><span class="p">(</span><span class="s2">&quot;미국에서도 같은 우려가 나오고 있다.&quot;</span><span class="p">)</span>
<span class="go">&lt;S&gt;</span>
<span class="go"> &lt;NP_AJT&gt;미국/NNP+에서/JKB+도/JX&lt;/NP_AJT&gt;</span>
Expand Down
22 changes: 22 additions & 0 deletions docs/_modules/pororo/tasks/constituency_parsing.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,28 @@ <h1>Source code for pororo.tasks.constituency_parsing</h1><div class="highlight"
<span class="sd"> result: result of constituency parsing</span>

<span class="sd"> Examples:</span>
<span class="sd"> &gt;&gt;&gt; const = Pororo(task=&quot;const&quot;, lang=&quot;en&quot;)</span>
<span class="sd"> &gt;&gt;&gt; const(&quot;I love this place&quot;)</span>
<span class="sd"> &lt;TOP&gt;</span>
<span class="sd"> &lt;S&gt;</span>
<span class="sd"> &lt;NP&gt;I&lt;/NP&gt;</span>
<span class="sd"> &lt;VP&gt;</span>
<span class="sd"> love</span>
<span class="sd"> &lt;NP&gt;this place&lt;/NP&gt;</span>
<span class="sd"> &lt;/VP&gt;</span>
<span class="sd"> &lt;/S&gt;</span>
<span class="sd"> &lt;/TOP&gt;</span>
<span class="sd"> &gt;&gt;&gt; const = Pororo(task=&quot;const&quot;, lang=&quot;zh&quot;)</span>
<span class="sd"> &gt;&gt;&gt; const(&quot;我喜欢饼干&quot;)</span>
<span class="sd"> &lt;TOP&gt;</span>
<span class="sd"> &lt;IP&gt;</span>
<span class="sd"> &lt;NP&gt;我&lt;/NP&gt;</span>
<span class="sd"> &lt;VP&gt;</span>
<span class="sd"> 喜欢</span>
<span class="sd"> &lt;NP&gt;饼干&lt;/NP&gt;</span>
<span class="sd"> &lt;/VP&gt;</span>
<span class="sd"> &lt;/IP&gt;</span>
<span class="sd"> &lt;/TOP&gt;</span>
<span class="sd"> &gt;&gt;&gt; const = Pororo(task=&quot;const&quot;, lang=&quot;ko&quot;)</span>
<span class="sd"> &gt;&gt;&gt; const(&quot;미국에서도 같은 우려가 나오고 있다.&quot;)</span>
<span class="sd"> &lt;S&gt;</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

24 changes: 23 additions & 1 deletion docs/seq2seq/const.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,29 @@
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">const</span> <span class="o">=</span> <span class="n">Pororo</span><span class="p">(</span><span class="n">task</span><span class="o">=</span><span class="s2">&quot;const&quot;</span><span class="p">,</span> <span class="n">lang</span><span class="o">=</span><span class="s2">&quot;ko&quot;</span><span class="p">)</span>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">const</span> <span class="o">=</span> <span class="n">Pororo</span><span class="p">(</span><span class="n">task</span><span class="o">=</span><span class="s2">&quot;const&quot;</span><span class="p">,</span> <span class="n">lang</span><span class="o">=</span><span class="s2">&quot;en&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">const</span><span class="p">(</span><span class="s2">&quot;I love this place&quot;</span><span class="p">)</span>
<span class="go">&lt;TOP&gt;</span>
<span class="go"> &lt;S&gt;</span>
<span class="go"> &lt;NP&gt;I&lt;/NP&gt;</span>
<span class="go"> &lt;VP&gt;</span>
<span class="go"> love</span>
<span class="go"> &lt;NP&gt;this place&lt;/NP&gt;</span>
<span class="go"> &lt;/VP&gt;</span>
<span class="go"> &lt;/S&gt;</span>
<span class="go">&lt;/TOP&gt;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">const</span> <span class="o">=</span> <span class="n">Pororo</span><span class="p">(</span><span class="n">task</span><span class="o">=</span><span class="s2">&quot;const&quot;</span><span class="p">,</span> <span class="n">lang</span><span class="o">=</span><span class="s2">&quot;zh&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">const</span><span class="p">(</span><span class="s2">&quot;我喜欢饼干&quot;</span><span class="p">)</span>
<span class="go">&lt;TOP&gt;</span>
<span class="go"> &lt;IP&gt;</span>
<span class="go"> &lt;NP&gt;我&lt;/NP&gt;</span>
<span class="go"> &lt;VP&gt;</span>
<span class="go"> 喜欢</span>
<span class="go"> &lt;NP&gt;饼干&lt;/NP&gt;</span>
<span class="go"> &lt;/VP&gt;</span>
<span class="go"> &lt;/IP&gt;</span>
<span class="go">&lt;/TOP&gt;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">const</span> <span class="o">=</span> <span class="n">Pororo</span><span class="p">(</span><span class="n">task</span><span class="o">=</span><span class="s2">&quot;const&quot;</span><span class="p">,</span> <span class="n">lang</span><span class="o">=</span><span class="s2">&quot;ko&quot;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">const</span><span class="p">(</span><span class="s2">&quot;미국에서도 같은 우려가 나오고 있다.&quot;</span><span class="p">)</span>
<span class="go">&lt;S&gt;</span>
<span class="go"> &lt;NP_AJT&gt;미국/NNP+에서/JKB+도/JX&lt;/NP_AJT&gt;</span>
Expand Down
22 changes: 22 additions & 0 deletions pororo/tasks/constituency_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,28 @@ class PororoConstFactory(PororoFactoryBase):
result: result of constituency parsing
Examples:
>>> const = Pororo(task="const", lang="en")
>>> const("I love this place")
<TOP>
<S>
<NP>I</NP>
<VP>
love
<NP>this place</NP>
</VP>
</S>
</TOP>
>>> const = Pororo(task="const", lang="zh")
>>> const("我喜欢饼干")
<TOP>
<IP>
<NP>我</NP>
<VP>
喜欢
<NP>饼干</NP>
</VP>
</IP>
</TOP>
>>> const = Pororo(task="const", lang="ko")
>>> const("미국에서도 같은 우려가 나오고 있다.")
<S>
Expand Down

0 comments on commit dafd29f

Please sign in to comment.