TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: A tool that transforms your whole list with just one example

764 pointsby createmyaccountabout 10 years ago

65 comments

BoppreHabout 10 years ago
Amazing tool.<p>Feature requests: allow for more than one example.<p><pre><code> Input: {&quot;class&quot;: &quot;101&quot;, &quot;students&quot;: 101} {&quot;class&quot;: &quot;201&quot;, &quot;students&quot;: 80} {&quot;class&quot;: &quot;202&quot;, &quot;students&quot;: 50} {&quot;class&quot;: &quot;301&quot;, &quot;students&quot;: 120} Example: Class 101 has 101 students Output: Class 101 has 101 students Class 201 has 201 students Class 202 has 202 students Class 301 has 301 students </code></pre> Right now the first line cannot have any ambiguity. This is fixable by reordering, but with large enough data sets I may have some ambiguity in <i>all</i> lines, at different places. Multiple examples would fix that.<p>Again, loved the tool. I can see this going very far, specially with non-technical people.
评论 #9433790 未加载
评论 #9435712 未加载
评论 #9433796 未加载
评论 #9433623 未加载
评论 #9434792 未加载
评论 #9435713 未加载
kyberiasabout 10 years ago
As mentioned by others, this is implemented in Excel 2013 as Flash Fill feature.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=UccfqwwOCoY" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=UccfqwwOCoY</a>
评论 #9436570 未加载
评论 #9434373 未加载
评论 #9437536 未加载
toygabout 10 years ago
Afaik, &quot;LeBron&quot; is his first name. The way you use it (and misspell it) is confusing, I&#x27;d suggest you replace him with a simpler alternative (Kobe Bryant? Tim Duncan? whatever).<p>Same for Kagawa -- the Japanese use surnames in a different way, might be simpler to replace him.
评论 #9436566 未加载
评论 #9436567 未加载
sitkackabout 10 years ago
This area of research is called &quot;program sketching&quot;, which creates programs by example.<p><a href="http:&#x2F;&#x2F;www.eecs.berkeley.edu&#x2F;Pubs&#x2F;TechRpts&#x2F;2008&#x2F;EECS-2008-177.html" rel="nofollow">http:&#x2F;&#x2F;www.eecs.berkeley.edu&#x2F;Pubs&#x2F;TechRpts&#x2F;2008&#x2F;EECS-2008-17...</a><p>edit: see below
评论 #9434079 未加载
Johnieabout 10 years ago
On your main screen, make the example editable. It would be nice to be able to just enter into the green box to see how it works rather than have to click through the &quot;Get Started&quot;<p>Also, your instructions makes it seem like the example is editable:<p>SUPER EASY TO USE 1. Paste your source data in the white box on the left.<p>2. Type in the green box on the right how you would like the first line of your data to look.<p>3. Transformy will look at your example and transform every line from your source data into the same format.
评论 #9436558 未加载
评论 #9437238 未加载
Rangi42about 10 years ago
This is a great idea! It didn&#x27;t behave the way I expected with some URLs as input, though:<p><pre><code> http:&#x2F;&#x2F;example1.org&#x2F;path&#x2F;index.html http:&#x2F;&#x2F;www.example2.org&#x2F;path&#x2F;index.html http:&#x2F;&#x2F;www.example3.org&#x2F; https:&#x2F;&#x2F;www.example4.org&#x2F;a&#x2F;b&#x2F;c&#x2F;d&#x2F;e&#x2F;f&#x2F;g&#x2F;hijklmnop </code></pre> The pattern I gave was:<p><pre><code> example1.org, path&#x2F;index.html </code></pre> So I expected to get:<p><pre><code> example1.org, path&#x2F;index.html www.example2.org, path&#x2F;index.html www.example3.org, www.example4.org, a&#x2F;b&#x2F;c&#x2F;d&#x2F;e&#x2F;f&#x2F;g&#x2F;hijklmnop </code></pre> Instead, I got:<p><pre><code> example1.org, path&#x2F;index.html wwwexample.2, org&#x2F;path.index wwwexample.3, org&#x2F;. wwwexample.4, org&#x2F;a.b </code></pre> A few feature requests: allow downloading the output as a text file; show a pseudo-code formula of how transformy interpreted the transformation, like &quot;s&#x2F;.+:\&#x2F;\&#x2F;(.+?)\&#x2F;(.*)&#x2F;\1, \2&#x2F;&quot;; and add support for common arbitrary transformations like &quot;November&quot;↔&quot;NOV&quot;↔&quot;11&quot;, or &quot;2&quot;↔&quot;2nd&quot;.
评论 #9436565 未加载
评论 #9436995 未加载
createmyaccountabout 10 years ago
Amongst other things this can be used for cleaning tables&#x2F;lists from special characters, changing date formats and creating xml or json.<p>Feedback and suggestions are very much welcome! We plan on adding a few more features soon as right now it is fairly basic but would like to hear some opinions and see if there&#x27;s people out there that have a use for this.
评论 #9433369 未加载
评论 #9433714 未加载
sytelusabout 10 years ago
Good concept but doesn&#x27;t work. Example, type different variations of legal well formatted addresses.<p><pre><code> 1 Microsoft Way Apt 43, Redmond, WA 98065, U.S.A. 1-1&#x2F;4 Palm Hwy, Colino, MA 87009, USA 500 Potasium Cloride, Sunshite-Big Blow City, PA 30000, United States of America </code></pre> First line output should look like:<p><pre><code> 1 Redmond 98065 U.S.A. </code></pre> Also having country-specific obscure sports terminology on landing page example can cause lot of confusion.
评论 #9436780 未加载
评论 #9435277 未加载
评论 #9436577 未加载
bikamonkiabout 10 years ago
Buggy, all I did is add Dean middle name to third line<p><pre><code> In: 3, Roberto Carlos, soccer, Brazil 35, Michael Jordan, baseball, USA 6, James Dean Lebron, basketball, USA 10, Shinji Kagawa, soccer, Japan Ex: Carlos is number 3 playing soccer Out: Carlos is number 3 playing soccer Jordan is number 35 playing baseball Dean is number 6 playing Lebron (what??) Kagawa is number 10 playing soccer </code></pre> I guess you can&#x27;t really solve the ambiguity of Carlos meaning the second word on the second column versus the last word of the second column; but the commas should at least hint a tabular pattern, no?
kyleredabout 10 years ago
I hope you sell your IP to Microsoft Excel. This would be a major time saver feature for a lot of the Excel world.
评论 #9433539 未加载
评论 #9433552 未加载
CodeWriter23about 10 years ago
For this crowd, I think the 3rd slide with the JSON transformation should be the first slide.
j2kunabout 10 years ago
For some reason it won&#x27;t handle certain characters...<p><pre><code> Input: Feature: 37, threshold: 4386, + Feature: 11, threshold: 1, + Feature: 10, threshold: 13, + Feature: 0, threshold: 34, + Feature: 39, threshold: 44, + Example: x[37] &gt;= 4386 Output: x[37] 4386 x[11] 1 x[10] 13 x[0] 34 x[39] 44</code></pre>
评论 #9434272 未加载
jnbicheabout 10 years ago
You know, for people that don&#x27;t know Awk or aren&#x27;t comfortable with a scripting language, this is a really nice idea. Thinking back to grad school, which was in a non-computer science quantitative field, there are lots of people that would have appreciated having something like this easily available.
评论 #9434683 未加载
Someone1234about 10 years ago
I love the product.<p>I have a small piece of feedback on the site. You could make it a tiny bit clearer that this is a free, registration free, service which people can start using with just one click.<p>When I first visited the site, I looked it over, noticed the email box and the &quot;get started&quot; and just assumed it was a library I&#x27;d need to buy. It wasn&#x27;t until I came back to the comments here that I realised the site was a service (which is actually extremely useful to me, and it has been bookmarked).<p>Why not just make <a href="http:&#x2F;&#x2F;www.transformy.io&#x2F;#&#x2F;app" rel="nofollow">http:&#x2F;&#x2F;www.transformy.io&#x2F;#&#x2F;app</a> your homepage instead?
评论 #9433849 未加载
ben010783about 10 years ago
This is a very cool tool. I wouldn&#x27;t trust it with any sensitive info though. The lack of terms, https, and the fact that it&#x27;s closed source means I have no idea of what could happen to the data I put in there.
hanozabout 10 years ago
If anyone&#x27;s interested here&#x27;s my own rather less sophisticated effort for these kind of odd jobs: <a href="http:&#x2F;&#x2F;whalemerge.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;whalemerge.com&#x2F;</a>
jalonso510about 10 years ago
If you&#x27;re translating into text that&#x27;s meant to be readable, it seems like you need to add a few items to your dataset that give additional information on natural language.<p>For example, I added some information in the example below about which pronoun to use based on gender. Would be really neat to have this sort of information built into the tool.<p>Input:<p><pre><code> {name: &quot;James&quot;, age:&quot;30&quot;, hobby: &quot;running&quot;, genderWord: &quot;his&quot;} {name: &quot;Erin&quot;, age:&quot;28, hobby: &quot;cooking&quot;, genderWord: &quot;her&quot;} {name: &quot;Owen&quot;, age:&quot;3&quot;, hobby: &quot;playing chase&quot;, genderWord: &quot;his&quot;} {name: &quot;Luke&quot;, age:&quot;1&quot;, hobby: &quot;reading&quot;, genderWord: &quot;his&quot;} </code></pre> Example: James is 30 years old and his favorite hobby is running<p>Output:<p><pre><code> James is 30 years old and his favorite hobby is running Erin is 28 years old and her favorite hobby is cooking Owen is 3 years old and his favorite hobby is playing chase Luke is 1 years old and his favorite hobby is reading</code></pre>
time0utabout 10 years ago
This works rather poorly.<p><pre><code> Input: {&quot;message&quot;:&quot;hello there&quot;,&quot;id&quot;:1} {&quot;message&quot;:&quot;why hello there&quot;,&quot;id&quot;:2} Example: {&quot;id&quot;:1,&quot;message&quot;:&quot;hello there&quot;} Output: {&quot;id&quot;:1,&quot;message&quot;:&quot;hello there&quot;} {&quot;there&quot;:id,&quot;message&quot;:&quot;why hello&quot;}</code></pre>
pravjabout 10 years ago
Nice tool and concept dude.<p>But it doesn&#x27;t seems to look properly at the meaning of content though.<p>I mean, I think it just finds the first presence of what the given pattern is and generates the result.<p>For example, I attempted this, with input data as date&#x2F;time.<p>input data:<p><pre><code> 2015-09-15T09:15:17-05:00 1998-11-05T08:15:21-05:00 1999-01-03T04:33:30-05:00 2000-11-05T09:16:00-05:00 </code></pre> pattern:<p><pre><code> 09:15 on 09-15 </code></pre> result:<p><pre><code> 09:15 on 09-15 11:05 on 11-05 01:03 on 01-03 11:05 on 11-05 </code></pre> What I was expecting:<p><pre><code> 09:15 on 09-15 08:15 on 11-05 04:33 on 01-03 09:16 on 11-05 </code></pre> Although I helped it at certain level by using the same special character pattern the input data has.<p>And as I was afraid, it doesn&#x27;t handle special characters, neither uses them in the process either, as @j2kun has mentioned in a comment.<p>But, it is promising at some point and have nice use cases too. :)
评论 #9436967 未加载
评论 #9434225 未加载
h43k3rabout 10 years ago
One can achieve the same in sublime text using the multiple cursors and edit feature. This is great for non tech people.<p>For those of you who are wondering what sublime text can do, do give a visit to a sublime text video series on tutsplus, its awesome and teaches you the power of sublime text
评论 #9433841 未加载
评论 #9433993 未加载
sz4kertoabout 10 years ago
For a second I thought this is some kind of a data mining&#x2F;ML&#x2F;search tool that could transform<p>USA, Barack<p>Germany, Angela<p>to<p>USA, Obama<p>Germany, Merkel<p>based on a single example. Do this please. :)
x0054about 10 years ago
There is a bug with multiword data points:<p><pre><code> Input: Bogdan, &quot;Yucca&quot; Josy, &quot;Orange County&quot; Bill, &quot;San Diego&quot; Example: Bogdan lives in Yucca Output: Bogdan lives in Yucca Josy lives in Orange Bill lives in San</code></pre>
geoelectricabout 10 years ago
This is neat. I find myself wanting more detail on what works, though. For example, I c&#x2F;ped your original example and tried &quot;Roberto C. from Brazil.&quot;<p>It didn&#x27;t infer that C. meant to truncate the last name, so everything ended up &quot;John C.&quot; No biggie, but trying to figure out what does and doesn&#x27;t work aside from tokenized string formatting was a bummer. Having the uppercase example led me to believe it could do more types of transformation.<p>Possible the right answer is hinting of some kind. &quot;Roberto {C.} from Brazil&quot; to hint that the C. should be matched with -something-, and since . naturally means abbreviation would mean &quot;starts with C&quot;.
评论 #9434744 未加载
phillmvabout 10 years ago
Avi Bryant demo&#x27;d this exact concept at an old CUSEC: <a href="https:&#x2F;&#x2F;vimeo.com&#x2F;4763707#t=27m20s" rel="nofollow">https:&#x2F;&#x2F;vimeo.com&#x2F;4763707#t=27m20s</a><p>I wish I knew which paper he was referring to - it&#x27;s a great feature :).
评论 #9434915 未加载
chdirabout 10 years ago
Any chance of making a plugin for Sublime Text?
评论 #9433937 未加载
评论 #9433554 未加载
评论 #9434176 未加载
mekazuabout 10 years ago
I&#x27;d usually use &#x27;perl -n -e&#x27; if I needed something like this. Not suggesting that perl is a better alternative but it&#x27;s a reason why I&#x27;d never need to use that tool.<p>Here&#x27;s the corresponding perl program using the same data and output as on the transformy home page:<p><pre><code> pbpaste | perl -p -e &#x27;s&#x2F;(\d+), (\w+) (\w+), (\w+), (\w+)&#x2F;@{[uc($3)]}, jersey number $1&#x2F;&#x27; </code></pre> To use that (pbpaste I think is a mac only feature) first copy &#x2F; paste that into your terminal, then copy the list, then hit enter in the terminal.
tomaskafkaabout 10 years ago
This! I wanted this feature to be in every text editor for years :)). Like <a href="http:&#x2F;&#x2F;nimbletext.com" rel="nofollow">http:&#x2F;&#x2F;nimbletext.com</a> but show and tell instead of expressions :).<p>Thanks!!!
评论 #9433823 未加载
bluishgreenabout 10 years ago
Can I make a script out of the learned transform operation? Ideally it will be a function that I can paste into some script, and call map on each row.
ZeroFriesabout 10 years ago
I like the idea.<p>Does not seem to handle my main use case however (transforming a schema entry in Rails to a list of symbols).<p>Eg:<p>Input:<p>t.integer &quot;Id&quot;<p>t.integer &quot;Active&quot;<p>t.string &quot;Email&quot;, null: false<p>t.string &quot;CryptedPassword&quot;, null: false<p>t.datetime &quot;created_at&quot;<p>t.datetime &quot;updated_at&quot;<p>Example:<p>:Id<p>Output:<p>:Id<p>:Active<p>:Email<p>:CryptedPassword<p>:created<p>:updated
jay-andersonabout 10 years ago
This is pretty neat. Since were asking for features: smarter date conversions. For instance on the input: &#x27;2015-04-24&#x27;, and for example output: &#x27;26 April 2015&#x27;. The if another line has &#x27;2015-03-01&#x27; it would output &#x27;1 March 2015&#x27;. This seems like a somewhat difficult problem, but it&#x27;d be magical if it worked.
评论 #9439979 未加载
babeardabout 10 years ago
Typo on third example on main page: {name: &#x27;Lennon&#x27;, <i>intrument</i>: &#x27;guitar&#x27;} should be <i>instrument</i>.
theunamedguyabout 10 years ago
Great tool, but too bad it can&#x27;t handle code very well.<p>An example (converting C++ to C):<p><pre><code> Input: void FileStream::write(char* , int); void VirtualMachine::cycle(int); Example: void FileStream_write(char* , int); Output: void FileStream_write(char* , int); void VirtualMachine_cycle(int* , ); </code></pre> Also, is it open-source?
评论 #9437284 未加载
misterdataabout 10 years ago
This is essentially the idea behind Warp, which can do it on large data sets and databases (<a href="https:&#x2F;&#x2F;pixelspark.nl&#x2F;2015&#x2F;warp-a-query-by-example-analysis-tool-for-big-data" rel="nofollow">https:&#x2F;&#x2F;pixelspark.nl&#x2F;2015&#x2F;warp-a-query-by-example-analysis-...</a>)
morganteabout 10 years ago
I&#x27;d love to see an embeddable version of this, or an API. It&#x27;d be awesome to embed this into our CMS.
fragsworthabout 10 years ago
Feature request:<p>Output javascript&#x2F;python&#x2F;regex&#x2F;whatever that performs the transformation between the two lists.
queriousabout 10 years ago
On a similar note: anyone know of a tool for generating SQL queries by example?
评论 #9437629 未加载
评论 #9433699 未加载
评论 #9433639 未加载
habiabout 10 years ago
Great use for quickly cleaning up stuff without looking into the `sed` options.
flipp3rabout 10 years ago
The last example with JSON replace is really nice, I do this regularly with regular expression find-replace with groups, on larger datasets. I guess i can forget about regular expressions now. Nice work!
robhawkesabout 10 years ago
I&#x27;d be keen to use something like this as an offline library. Is there anything similar that exists out there for auto-detecting data formatting and structure, but as a library instead?
goshxabout 10 years ago
I like it!<p>I found that it doesn&#x27;t like &quot;=&quot; in the transformation result.
评论 #9433966 未加载
评论 #9433860 未加载
throwaway43about 10 years ago
How is this done ?<p>Do you need to use some fancy AI or machine learning algorithm ?<p>Looks pretty mind blowing.<p>Mad respect.
评论 #9434357 未加载
nicklesabout 10 years ago
This is very cool. Are there any restrictions on using the API?
KenoFischerabout 10 years ago
I tried a list of unicode characters and their codepoint numbers, but it doesn&#x27;t seem to recognize the unicode characters probably. Perhaps a normalization issue?
fiatjafabout 10 years ago
Really great. Manipulating lists is the hardest thing in the world for common people, while for any programmer it is really easy. This should even the things a little.
sulamabout 10 years ago
Not sure that this is doing what it&#x27;s supposed to. This series:<p>11&#x2F;1&#x2F;2008, 12&#x2F;1&#x2F;2008, 6&#x2F;1&#x2F;2009<p>transformed to this:<p>November 1, 2008, November 1, 2008, November 1, 2009
评论 #9433740 未加载
评论 #9433737 未加载
hypolietabout 10 years ago
Sometimes, I have to use a bunch of numbers in an SQL query and surround them with single quotes and a comma. Seems a good fit, thanks.
LargeWuabout 10 years ago
Another bug:<p>Adding a middle initial to the first player (Carlos), but no other lines, and I typed in &quot;Carlos plays soccer&quot; results in:<p>Carlos plays soccer<p>baseball plays USA<p>basketball plays USA<p>soccer plays Japan<p>Cool idea though.
fcholletabout 10 years ago
I attempted to extract postal codes from csv lines that contained addresses (as well as some unrelated info). Complete failure : (
thisisananthabout 10 years ago
I&#x27;ve been using regular expressions in Notepad++ for doing this kind of things. This is awesome and would save a lot of time.
swalshabout 10 years ago
It would be cool if I could provide an xml file as input, and use the example to generate an xpath query quickly.
sachingupta006about 10 years ago
There is a bug with the tool, I have list data in this format (modified data for privacy)<p>abc, The Institue of<p>xyz, The school of<p>nbc2, The college of<p>jor5, School of<p>and if I try to extract just the name of the person it gives me the following<p>abc<p>xyz<p>nbc<p>jor<p>It&#x27;s missing the numbers
hobbyistabout 10 years ago
I think Makefile have such pattern matching, which can be utilized to do such list transformations too.
zubairqabout 10 years ago
In chrome it doesn&#x27;t work. It never seems to update in real time, only at random long intervals
评论 #9433717 未加载
vigile_about 10 years ago
OK! And now what are we supposed to do with sed, tr, grep, etc?? ;-)
toomimabout 10 years ago
Who made this? I want to know who I&#x27;m giving mad respect to. :)
fiatjafabout 10 years ago
What is the monetization strategy? I&#x27;m curious.
anton_tarasenkoabout 10 years ago
Any command-line version of this? API? )<p>PS: A very nice tool!
hugozapabout 10 years ago
This would be useful as npm module.
grandalfabout 10 years ago
for this list:<p><pre><code> tennis 3 4 5 wilson 1 2 3 robert 5 6 7 </code></pre> some patterns that didn&#x27;t work:<p>tennis nis<p>tennis 12
评论 #9434766 未加载
elwellabout 10 years ago
Useful if Emacs is unavailable.
评论 #9436541 未加载
jamies888888about 10 years ago
Yep. This is great. Well done.
leanthonyrnabout 10 years ago
any Emacs tool libraries that will mimic?
hypolietabout 10 years ago
goe bezig manne!
FiReaNG3Labout 10 years ago
&quot;We&#x27;re impoving transformy&quot;<p>Start by improving your proofreading :)
评论 #9433764 未加载
arexiabout 10 years ago
Is anyone else bothered by the fact that 5 years ago, this would have been a free command line tool? But nowadays it&#x27;s a closed-source web app instead?
评论 #9434636 未加载