HN user

alexcg1

96 karma

Dev Experience Lead at Jina AI - building neural search and generative AI.

I also train AIs to write crappy Star Trek scripts and I build animatronic butterflies

Posts17
Comments56
View on HN
medium.com 3y ago

Search nested data with Python, DocArray and subindices

alexcg1
3pts0
colab.research.google.com 3y ago

Search PDF text, tables, images with Python and CLIP

alexcg1
5pts0
medium.com 3y ago

Summarizing text to create storyboards with DistilBART model and DiscoArt

alexcg1
13pts1
medium.com 3y ago

The next level of multi-modality in DocArray

alexcg1
13pts0
colab.research.google.com 3y ago

Text/image product search, using Python and CLIP

alexcg1
2pts0
medium.com 3y ago

Using Karpenter to manage GPU nodes with time-slicing

alexcg1
4pts0
medium.com 3y ago

IT Threat Detection Using Neural Search: Part 2

alexcg1
5pts0
github.com 3y ago

Jainammm/TableNet: Model for table detection/extraction from scanned documents

alexcg1
1pts0
colab.research.google.com 3y ago

Genshin Impact Fine-tuning CLIP for anime search

alexcg1
32pts3
www.vice.com 3y ago

Mars Express Images Show What's Inside the Biggest Canyon in the Solar System

alexcg1
2pts0
colab.research.google.com 3y ago

Search PDFs with Transformers and Python Notebook

alexcg1
132pts51
betterprogramming.pub 4y ago

Generating Graphic Novels with Deep Neural Networks – DALL-E Flow and GPT-3

alexcg1
2pts0
colab.research.google.com 4y ago

Show HN: Neural Search for Stack Overflow

alexcg1
15pts0
medium.com 4y ago

Show HN: Build Multimodal AI Search Using Nocode

alexcg1
2pts0
github.com 5y ago

Show HN: Jina – Open-source AI framework to build search for anything, fast

alexcg1
22pts4
jina.ai 5y ago

One Year in Open-Source Neural Search: Jina AI's 2020 Year in Review

alexcg1
12pts1
hackernoon.com 6y ago

Open Source Explained by 1980s Cartoons

alexcg1
2pts1

What kinda thing do you want to search? Text I guess? But there are search engines for images, gifs, video, all kinds of stuff.

I'm working at an open-source project that builds an AI-powered search framework [0], and I've built some examples in very few lines of code (for searching fashion products via image or text [1], PDF text/images/tables search [2]) and one of our community members built a protein search engine [3].

A good place to start might be with a no-code solution like (shameless self-plug time) Jina NOW [4], which lets you build a search engine and GUI with just one CLI command.

[0] https://github.com/jina-ai/jina/

[1] https://examples.jina.ai/fashion/

[2] https://colab.research.google.com/github/jina-ai/workshops/b...

[3] https://github.com/georgeamccarthy/protein_search

[4] https://now.jina.ai

For me, I'll invite as many close friends as possible to a restaurant with cuisine we've never tried before (last time was Ethiopian). It starts off a new year (relative to my birth) with novelty, good food, and warm feelings

[dead] 4 years ago

And I'd say Disco creates a more ethereal-feeling art. It's cool to watch noise just de-noise over time and see strange creations coming forth

This is more related to search tasks, where we encode text and image pairs to use text to search image. ResNet can also be served a backbone for search tasks: content-based image search/reverse image search/search image with image. You need to remove the ResNet50 classification head.

On the other hand, Tensorflow or MLNet are machine learning frameworks, to achieve the task you can choose whatever you want to build the model components.

I know folks with thousands to millions of PDFs using the Jina framework and it works fine. I hear what you're saying about frontends and lightweight though. Jina doesn't come with any cross-platform frontends, though Jina NOW has a Streamlit interface that's responsive (so works across devices)

In terms of matching embeddings and performing similarity search on text/images - folks are already using the framework (Jina) for that and getting decent results.

In terms of processing the PDFs and extracting that data. idk. That depends on a lot of factors - e.g. do you need to OCR the PDFs or can just extract text directly? Either way, should be possible to write a module and then easily scale it up (Jina supports shards/replicas). Anyway, lemme know. I'm in talks with folks about this kind of shitshow...uh...use case now.

Jina supports multiple vector database backends, like Weaviate, Qdrant and others. For others (like Milvus), suggest you ask on the Slack [0] - responses tend to be fast.

[0] https://slack.jina.ai

I may have misworded it (if I wrote those words - PDF rots the brain and my memory likewise).

Agreed on the rest. PDFs don't store machine-readable data. Often just pixelated scanned hot garbage dumpster fire text.

I hate PDFs but have to work with the satanforesaken things. Hence the notebook. It's my little way of trying to give my little PDF-bespoked-hellscape a tiny little glow-up.

I feel your pain my brother(?) [0] in suffering. That's why I started simple in the notebook. Even trying to go a little more complex just leads to exponential rabbit holes and footguns.

[0] based on typical HN demographics, no assumptions here

Getting the URI of original PDF would be straightforward enough - I could whack that into the code tomorrow with a few lines.

Opening up the correct page? I don't know of any standardized PDF reader that supports that kind of thing. And the format has such a history that even if it were supported (technically by Adobe - don't even get me started on what PDF readers support what formats), there's no guarantee the file itself would even have that cooked in.

- Modern PDFs - if you wanna extract text and images, then the PDFSegmenter used in my example will work. If tables too, might need some additional jiggery-pokery, but definitely doable. I know other ppl using the same framework (Jina) who've accomplished it.

- Exact word search - pretty simple. I've focused on more advanced stuff because color vs colour is same same but different. Also just because it's pretty easy since I'm just using pre-defined building blocks, not manually integrating stuff

- Cross platform frontend - I've seen a lyrics search frontend [0] and I've built stuff in Streamlit before. Jina offers RESTful/gRPC/WebSockets gateways so it can't be too tough

- Lightweight? I mean how lightweight do you want it? C? Bash? Assembly? I've found Python good for text parsing

- Long-term: The notebook I wrote has a few (each of which have their own), but compared to others they're relatively lightweight.

- Gluing code: I've been using pre-existing building blocks, and writing new Executors (i.e. building blocks) is relatively straightforward, and then scaling them up with shards, replicas, etc is just a parameter away.

I'm more into the search side then the PDF stuff. The PDF side I've had experience with through bitter suffering and torment. Not a fun format to work with (unless you're into sado-masochism)

[0] https://github.com/jina-ai/examples/tree/master/multires-lyr...

Oh, nifty! This is more a demo of a PDF search engine that you could (in parts 1 thru x of the series) deploy to an intranet (for internal knowledge search) or internet (for general search), rather than a collaborative tool.

For handwritten/math symbols, I'm sure it wouldn't be too hard to integrate something. The Jina Flow [0] concept makes integrating new Executors [1] pretty easy.

I LOVE the testimonials on the site btw!

[0] https://docs.jina.ai/fundamentals/flow/

[1] https://docs.jina.ai/fundamentals/executor/

In that case I'd use:

1. PDFSegmenter (in the notebook) - extract the images of the text (yup, it does images too) 2. An OCR Executor [0][1] from Jina Hub [2] to extract the text from the images 3. Actually splice the text chunks together to be what you'd expect - that's the tricky part. Even text splitting over pages can be tricky to reassemble properly. PDFs are a pain the butt frankly.

[0] https://hub.jina.ai/executor/78yp7etm

[1] https://hub.jina.ai/executor/w4p7905v

[2] https://hub.jina.ai

If new and different phenomena means new kinds of corruption and downright weird behavior I'll end up having no hair left!

Even printing the same page to PDF with Chrome and Firefox delivers quite different results. Firefox was often combining "f" and "i" into fi ligature [0] which totally changed the meaning of "finished" for example.

Downloading a lot of random PDFs from arxiv would be great for making something battle-hardened and robust (and I'd love to get the chance to do it sometime) but I didn't have the time (or the remaining hair) to do it this time round.

[0] https://www.compart.com/en/unicode/U+FB01

I'll agree that there's quite a bit of junk punctuation in the extracted sentences (and sentence fragments), quite often from short footnotes in the Wiki articles. Getting "good" PDFs with open usage rights was a bit tricky, especially in a super simple PDF format. I ended up PDF-printing from Chrome.

Needless to say, working with PDFs makes me want to pull my hair out.

I also ended up writing the SpacySentencizer Executor instead of using a "vanilla" sentencizer. That led to consistent sentence splitting (so "J.R.R. Tolkien turned to pg. 3" would be one sentence, not 5)

For testing, Jina allows you to swap out encoders with just a couple of lines of code, so trying different methods out should work just fine.