Questions tagged [embedding]

An embedding is one instance of some structure contained within another instance, such as a group that is a subgroup.

An embedding is one instance of some structure contained within another instance, such as a group that is a subgroup.

Links:

1356 questions
12
votes
1 answer

Call Racket function from C

I have a Racket module hw.rkt: #lang racket/base (provide hw) (define (hw) (displayln "Hello, world!")) I would like to write a C program that embeds the Racket runtime and applies the procedure (hw). There is example code here which demonstrates…
Arandur
  • 727
  • 6
  • 19
11
votes
3 answers

WebKit or Gecko - which one is better for embedding in C++ app?

Which one would you choose and why? I'd like to hear opinions from people having experience with embedding a web browser engine in C++ application. I should stress I need all features of web browser engine except rendering i.e. HTTP client, cookie…
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
11
votes
3 answers

Golang: Type assign with another struct

So I have this example here: Go Playground package main import ( "fmt" ) type Circle struct{} func (c Circle) Something() { fmt.Println("something") } type Rectangle struct { Circle } func (a Rectangle) SomethingElse() { …
simplebird
  • 121
  • 1
  • 6
11
votes
2 answers

What does tokens and vocab mean in glove embeddings?

I am using glove embeddings and I am quite confused about tokens and vocab in the embeddings. Like this one: Common Crawl (840B tokens, 2.2M vocab, cased, 300d vectors, 2.03 GB download) what does tokens and vocab mean, respectively? What is the…
Zhao
  • 2,043
  • 1
  • 17
  • 36
11
votes
1 answer

Efficiently Finding Closest Word In TensorFlow Embedding

Recently, I've been trying to find the closest word to an embedding. The two most notable ways of doing this is by cosine distance or euclidean distance. I'm trying to find how to efficiently compute the cosine distance for a tensor of shape…
LeavesBreathe
  • 1,010
  • 2
  • 9
  • 17
11
votes
1 answer

What is the idiomatic way in Go to create a complex hierarchy of structs?

I am writing an interpreter in Go and I am looking for the idiomatic way to store the AST. I read the Go compiler source code and it seems they used interfaces with an empty method to represent the AST. For example, we have the following…
unnamed_addr
  • 1,217
  • 2
  • 12
  • 14
11
votes
2 answers

Does embedding c++ code in python make your python application faster?

Does embedding c++ code in python using ctypes, boost.python, etc make your python application faster? Suppose I am making an application in pygtk and I need some functions which need to be fast. So if I use c++ for certain tasks in my application…
10
votes
2 answers

Embedding: mono vs lua

I am interested in hearing about peoples experience with embedding mono (open source implementation of .NET) in a C/C++ application. How is it to distribute such an application and what are the dependencies? I have tested on OS X and mono comes as a…
Erik Engheim
  • 8,182
  • 4
  • 36
  • 51
10
votes
1 answer

Why word2vec doesn't use regularization?

ML models with huge number of parameters will tend to overfit (since they have a large variance). In my opinion, word2vec is one such models. One of the ways to reduce the model variance is to apply a regularization technique, which is very common…
Tural Gurbanov
  • 742
  • 2
  • 7
  • 27
10
votes
1 answer

Use Tensorflow and pre-trained FastText to get embeddings of unseen words

I am using a pre-trained fasttext model https://github.com/facebookresearch/fastText/blob/master/pretrained-vectors.md). I use Gensim to load the fasttext model. It can output a vector for any words, no matter it is seen or unseen…
Munichong
  • 3,861
  • 14
  • 48
  • 69
10
votes
1 answer

Embedding IronPython, built-in help command, my CLR objects

I'm embedding IronPython (2.6.1) in a C# assembly and exposing several objects to scripts which are executed with PythonEngine.ExecuteFile. I expose them either with scope.SetVariable("SomeObject", new SomeObject()) or engine.Execute("from…
Tergiver
  • 14,171
  • 3
  • 41
  • 68
10
votes
2 answers

How to embed a graphical interactive IronPython shell in an application?

I've tried the obvious path in my pet open source project RevitPythonShell (a plugin for the building modeling software Autodesk Revit Architecture 2010): code.interact() with the IronPython engine set up to use .NET streams for STDIN and STDOUT.…
Daren Thomas
  • 67,947
  • 40
  • 154
  • 200
10
votes
0 answers

Embedding a native window inside a JFrame

Does anyone know of a method or API that supports embedding a native window inside either a Java JFrame or JPanel? I found this previous post: How do I run an external program inside a Java frame in netbeans in a platform independent manner? I can…
Graham Seed
  • 742
  • 3
  • 10
  • 24
10
votes
2 answers

Where is documentation on the embedding API for the Ruby interpreter?

I am looking for a comprehensive, online, documentation resource regarding the embedding of the Ruby interpreter into C or C++ programs, and the API(s) for that purpose. The section on this in the Pickaxe book is quite good, but my version refers to…
grrussel
  • 7,209
  • 8
  • 51
  • 71
9
votes
1 answer

What is the network structure inside a Tensorflow Embedding Layer?

Tensoflow Embedding Layer (https://www.tensorflow.org/api_docs/python/tf/keras/layers/Embedding) is easy to use, and there are massive articles talking about "how to use" Embedding (https://machinelearningmastery.com/what-are-word-embeddings/,…
dogdog
  • 133
  • 7