duckduckgo / zeroclickinfo-fathead

DuckDuckGo Instant Answers based on keyword data files
https://duckduckhack.com/
Other
318 stars 365 forks source link

SearchCode - Errant "[" after code snippet? #103

Closed moollaza closed 8 years ago

moollaza commented 9 years ago

Looks like the parser is adding [] around it the "More at" link which is causing problems. We can remove them as the source has rebranded itself anyways: https://searchcode.com/

https://duckduckgo.com/?q=php+implode

php_implode__php__at_duckduckgo

arush0311 commented 8 years ago

Can I take this?

moollaza commented 8 years ago

Yes!

arush0311 commented 8 years ago

Sorry I could not find where the bug is. Can you help me?

rasikapohankar commented 8 years ago

Hey @moollaza! Is this done? If not, can I try this?

sahildua2305 commented 8 years ago

Anyone of you working on this? @rasikapohankar @arush0311 If not, I can get this done asap. I have been working on developing IA SearchCode in Spice as well. https://github.com/duckduckgo/zeroclickinfo-spice/pull/2810

moollaza commented 8 years ago

@sahildua2305 you should be good to work on this 👍

sahildua2305 commented 8 years ago

@moollaza Can you please help me in finding the code for this one? Unable to locate it in /lib/fathead/ :disappointed:

moollaza commented 8 years ago

@sahildua2305 it looks like this IA may actually be internal, meaning it's probably a little outdated.

@jdorweiler can you confirm if the PHP Fathead still exists internally?

@sahildua2305 would you be interested in created a new open-source, PHP Fathead?

sahildua2305 commented 8 years ago

@moollaza yes! I'll be interested in creating a new PHP fathead once it's confirmed that the internal one doesn't exist.

moollaza commented 8 years ago

yes! I'll be interested in creating a new PHP fathead once it's confirmed that the internal one doesn't exist.

@sahildua2305 seeing as we can't find it in the repo it almost certainly exists internally, but I doubt we have the original scripts used. It's likely just the data, so an updated/improved open source PHP Instant Answer would only be an improvement. Ideally all the Programming Language Fatheads should be open source!

sahildua2305 commented 8 years ago

@moollaza Ok. So I will start working on it.

Ideally all the Programming Language Fatheads should be open source!

Yes I could see Fatheads for almost all major languages except for PHP.

Also, as I can see for other fatheads, we can use any of the languages (Go, JS or Python) for downloading and parsing?

jdorweiler commented 8 years ago

The old fathead is opensource but doesn't work anymore. I think this is the one https://github.com/duckduckgo/zeroclickinfo-fathead/blob/master/lib/fathead/UNCLEAN/parse_phpfunction.py

I'd just start over from scratch though.

sahildua2305 commented 8 years ago

@jdorweiler I think I will be good to take this up. What do you think? cc @moollaza

jdorweiler commented 8 years ago

@sahildua2305 sounds good. Ping me on a pull request if you need any help.

sahildua2305 commented 8 years ago

Sure! @jdorweiler

moollaza commented 8 years ago

Will be fixed in #399