TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Cyborg Writer - In-Browser Text Editor with Neural Autocomplete

71 点作者 antimatter15超过 7 年前

12 条评论

antimatter15超过 7 年前
Hey HN!<p>This is our latest demo for TensorFire (<a href="https:&#x2F;&#x2F;tenso.rs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tenso.rs&#x2F;</a>), a Javascript library for running neural networks in the browser GPU-accelerated by WebGL.<p>Each of these models is a simple two-layer char-rnn (the kind explored in Karpathy&#x27;s &quot;Unreasonable Effectiveness of RNNs&quot; post <a href="http:&#x2F;&#x2F;karpathy.github.io&#x2F;2015&#x2F;05&#x2F;21&#x2F;rnn-effectiveness&#x2F;" rel="nofollow">http:&#x2F;&#x2F;karpathy.github.io&#x2F;2015&#x2F;05&#x2F;21&#x2F;rnn-effectiveness&#x2F;</a>). When you hit &quot;Tab&quot; the editor feeds in the contents of your document letter-by-letter into a network which is trying to predict the most likely next letter. It samples from that probability distribution and feeds it back into the network to generate an arbitrarily long string.<p>We&#x27;ve published code and instructions for training new models on Github (<a href="https:&#x2F;&#x2F;github.com&#x2F;tensorfire&#x2F;cyborg-writer&#x2F;tree&#x2F;master&#x2F;training" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tensorfire&#x2F;cyborg-writer&#x2F;tree&#x2F;master&#x2F;trai...</a>). With about a megabyte of any sort of text, you can train a model and easily embed it into any web application.<p>We (@bijection and @antimatter15) will be answering questions in the comments.
评论 #15559412 未加载
jaster超过 7 年前
Ha very nice!<p>I made a vary similar (but much rougher around the edges) project for fun a few months ago using a smaller french corpus of press releases from <i>La Quadrature du Net</i> (a non-profit lobbying for net neutrality in France and Europe).<p>There is a live demo at <a href="http:&#x2F;&#x2F;jorquera.net&#x2F;quadra_neural&#x2F;" rel="nofollow">http:&#x2F;&#x2F;jorquera.net&#x2F;quadra_neural&#x2F;</a>. You can press tab to auto-complete word-by-word, or just start typing and the suggestions update on the fly. Instead of &quot;Weirdness&quot; I called my cursor &quot;Drunkenness&quot; :)<p>I used keras-js (<a href="https:&#x2F;&#x2F;github.com&#x2F;transcranial&#x2F;keras-js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;transcranial&#x2F;keras-js</a>) to run my model in the browser.<p>If you are interested in this kind of experiments, do go for it! It&#x27;s quite accessible, and projects of this scale do not require heavy hardware (I generated my models using a GTX 770).<p>If you need a kickstart, in addition to the repo from the OP all the code for my project is Free Software (<a href="https:&#x2F;&#x2F;github.com&#x2F;tomjorquera&#x2F;quadra_neural" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tomjorquera&#x2F;quadra_neural</a>), and I tried to document the generation process in a jupyter notepad <a href="https:&#x2F;&#x2F;github.com&#x2F;tomjorquera&#x2F;quadra_neural&#x2F;blob&#x2F;master&#x2F;generation&#x2F;model_gen.ipynb" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tomjorquera&#x2F;quadra_neural&#x2F;blob&#x2F;master&#x2F;gen...</a>. While I did it on a french corpus, it should work with any language.<p>I used two main resources for inspiration :<p>- <a href="http:&#x2F;&#x2F;karpathy.github.io&#x2F;2015&#x2F;05&#x2F;21&#x2F;rnn-effectiveness&#x2F;" rel="nofollow">http:&#x2F;&#x2F;karpathy.github.io&#x2F;2015&#x2F;05&#x2F;21&#x2F;rnn-effectiveness&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;fchollet&#x2F;keras&#x2F;blob&#x2F;master&#x2F;examples&#x2F;lstm_text_generation.py" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fchollet&#x2F;keras&#x2F;blob&#x2F;master&#x2F;examples&#x2F;lstm_...</a>
westoncb超过 7 年前
Pretty hilarious. I&#x27;ve found Tupac to work the best, e.g. (my starting text in quotes):<p><pre><code> &quot;I was reading Hacker News when&quot; he gladed out Somebody excuse I went down today I wonder if I give a fuck, when I creep </code></pre> For some reason Donald Trump always seems to produce garbage...
评论 #15555622 未加载
c3534l超过 7 年前
Eh, it&#x27;s scarcely better than a Markov chain. I was hoping for something a little more useful, like the ability to scroll through many similar words or concepts.
评论 #15555891 未加载
nsomaru超过 7 年前
Fun with Shakespeare:<p>It seemed, somehow mock&#x27;d; Unbashed as it was my father.<p>My lady shall have him, perchance and reasons will abide it. Upon his unspoken thing, the devil shall see.<p>MISTRESS QUICKLY: Hide amongst you the gods? Wherefore comes here, sir?
dchuk超过 7 年前
We have to be pretty close to someone having a system to generate mountains of convincing&#x2F;unique &quot;content&quot; using Neural Nets (or something comparable) for the purposes of web spam&#x2F;seo right?<p>Back in the day, SEOs would use spun content to generate lots of unique variants. But at this point, surely a ML algorithm can crack this nut?
评论 #15554691 未加载
giosch超过 7 年前
I was expecting it to at least generate valid words, but that doesn&#x27;t seem to be the case...
评论 #15553268 未加载
评论 #15552795 未加载
stmw超过 7 年前
This is actually pretty neat, although requires more digging
sterex超过 7 年前
Is there a technical reason why it generates text with lot of spelling mistakes?<p>Ayn Rand seems very sloppy with her spelling!
novium超过 7 年前
It&#x27;s pretty neat, even got a t.co URL. Sadly, it didn&#x27;t lead anywhere.
ttul超过 7 年前
Mobile Safari just sits there...
_grep_超过 7 年前
Hitting tab crashes Chrome for me.
评论 #15553089 未加载