Amazing tool. Feature requests: allow for more than one example. Input: {"class": "101", "students": 101} {"class": "201", "students": 80} {"class": "202", "students": 50} {"class": "301", "students": 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 Right now the first line cannot have any ambiguity. This is fi…
For that use case you can use the Lapis[1][2] desktop app (the secret weapon I use for data munging), which allows you to choose several examples and edit a file with direct manipulation - or define patterns using a DSL. [1] https://en.wikipedia.org/wiki/Lapis_(text_editor) [2] http://groups.csail.mit.edu/uid/lapis/
Show HN: A tool that transforms your whole list with just one example
81–90 of 151 posts
Re: Show HN: A tool that transforms your whole list with just one example
#82As mentioned by others, this is implemented in Excel 2013 as Flash Fill feature. https://www.youtube.com/watch?v=UccfqwwOCoY
Do you know if this is available on the new Excel for Mac too?
It's one of many missing features.
Re: Show HN: A tool that transforms your whole list with just one example
#83Does not seem to handle my main use case however (transforming a schema entry in Rails to a list of symbols).
Eg:
Input:
t.integer "Id"
t.integer "Active"
t.string "Email", null: false
t.string "CryptedPassword", null: false
t.datetime "created_at"
t.datetime "updated_at"
Example:
:Id
Output:
:Id
:Active
:CryptedPassword
:created
:updated
Re: Show HN: A tool that transforms your whole list with just one example
#84Earlier quoted context omitted.
This is really neat! Any chance this will be a cli tool or module/library? It doesn't seem to play will with something like this as an input: 3, Roberto/Carlos, soccer, Brazil 35, Roberto/Carlos Michael Jordan, baseball, USA 6, Roberto/Carlos James Lebron, basketball, USA 10, Roberto/Carlos Shinji Kagawa, soccer, Japan Format: 3, ROBERTO/CARLOS, soccer, Brazil Gives me: 3, ROBERTO/CARLOS, soccer, Brazil 35, ROBERTO/C…
Given this "35, Roberto/Carlos Michael Jordan, baseball, USA" tuple what are you expecting as output?
See other response as it works on word by word. Here is (hopefully) a better example:
Input:
35, Billy Jean, soccer, USA
29, Billy Jo Jean, football, USA
Transform-at: 35, soccer, Billy Jean, USA
You'll get: 35, soccer, Billy Jean, USA
29, Jean, Billy Jo, football
But I was expecting: 35, soccer, Billy Jean, USA
29, football, Billy Jo Jean, USARe: Show HN: A tool that transforms your whole list with just one example
#85Re: Show HN: A tool that transforms your whole list with just one example
#86I love the product. 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. When I first visited the site, I looked it over, noticed the email box and the "get started" and just assumed it was a library I'd need to buy. It wasn't until I came back to the comments here that I realised the site w…
That was originally the plan but we showed it to some non technical people and they only understood the idea once we showed some examples. But you are right that we should make it more clear that it's free. Thanks!
Re: Show HN: A tool that transforms your whole list with just one example
#87Is anyone else bothered by the fact that 5 years ago, this would have been a free command line tool? But nowadays it's a closed-source web app instead?
I mean, you can replicate the core functionality of this fairly easily using awk, and if you're happy doing a bit of piping to perl or whatever, the fancier time re-formatting stuff is also easy.
In essence, the complexity in this tool (and what makes it cool) is the figuring out what you are trying to do without telling it - if you can run a command line tool you can tokenise the input yourself and you're most of the way there already.
Re: Show HN: A tool that transforms your whole list with just one example
#88It didn't infer that C. meant to truncate the last name, so everything ended up "John C." No biggie, but trying to figure out what does and doesn'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.
Possible the right answer is hinting of some kind. "Roberto {C.} from Brazil" to hint that the C. should be matched with -something-, and since . naturally means abbreviation would mean "starts with C".
Re: Show HN: A tool that transforms your whole list with just one example
#89This area of research is called "program sketching", which creates programs by example. http://www.eecs.berkeley.edu/Pubs/TechRpts/2008/EECS-2008-17... edit: see below
It's more accurate to call it "programming by example", which is a much older term, in common use, and actually means "creating programs by example". http://en.wikipedia.org/wiki/Programming_by_example Sketching means to provide a partial specification, of which details are filled in by the system. But in this case, the user is providing a full description of a single concrete example. These are different concepts.
Re: Show HN: A tool that transforms your whole list with just one example
#90You know, for people that don't know Awk or aren'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.