Introduction
The world of Pure Language Processing (NLP) has burgeoned lately, revolutionizing the way in which people work together with know-how and one another. On the coronary heart of this transformative subject lies the intricate mechanism that seeks to understand the connection between phrases, enabling machines to know the nuances of human language. This essay delves into the elemental parts of the mechanism that underpins our means to grasp the intricate net that connects phrases throughout the realm of NLP.
Language as a Advanced Community
Language, as a way of communication, is a dynamic and complicated net of phrases and ideas intricately linked to one another. The connection between phrases shouldn’t be solely based mostly on their definitions but in addition on their contexts, connotations, and cultural significance. This interconnectedness varieties the inspiration of linguistic communication, and unlocking this net has been a major purpose of NLP.
Statistical Language Fashions
The mechanism for understanding the connection between phrases in NLP begins with statistical language fashions. These fashions are skilled on huge quantities of textual content information to be taught the possibilities of phrase sequences occurring collectively. One of many groundbreaking developments on this space is the appearance of neural networks, notably Recurrent Neural Networks (RNNs) and extra superior variations like Transformers. These networks seize the sequential nature of language and its contextual dependencies, permitting them to foretell the following phrase in a sequence based mostly on the previous phrases.
Phrase Embeddings and Semantic Areas
To know the connection between phrases, NLP employs an idea often known as phrase embeddings. Phrase embeddings signify phrases as dense, steady vectors in a high-dimensional area. This mapping permits phrases with comparable meanings to be located nearer to one another on this area. Strategies like Word2Vec, GloVe, and FastText have paved the way in which for capturing semantic relationships between phrases, enabling machines to acknowledge synonyms, antonyms, and even analogies.
Contextual Understanding
The true essence of understanding the connection between phrases lies within the contextual understanding of language. Phrases can have a number of meanings relying on the context they seem in. This problem is tackled by contextual phrase embeddings, a leap ahead from static phrase embeddings. Fashions like ELMo, GPT, and BERT leverage deep studying architectures to seize the context by which a phrase seems, permitting them to supply extra correct representations that encapsulate the richness of language.
Syntactic and Semantic Evaluation
NLP mechanisms delve deeper into understanding connections by contemplating not solely semantic relationships but in addition syntactic buildings. Parsing sentences into grammatical buildings and figuring out dependencies between phrases present insights into the roles completely different phrases play inside a sentence. This syntactic and semantic evaluation is essential for comprehending advanced sentences and producing coherent responses in functions like chatbots and language translation.
Functions and Implications
Understanding the connection between phrases via NLP mechanisms has led to transformative functions throughout numerous domains. Chatbots interact in additional pure conversations, machine translation achieves higher accuracy, sentiment evaluation discerns emotional nuances, and search engines like google retrieve extra related outcomes. Moreover, the implications of NLP lengthen to bridging language obstacles, enabling accessibility for the differently-abled, and even aiding within the discovery of hidden patterns inside huge corpora of textual content information.
Challenges and Future Instructions
Whereas NLP has made exceptional strides in understanding the connection between phrases, challenges stay. Contextual understanding stays a posh activity, notably in languages with intricate grammatical buildings. Addressing bias and moral considerations inside NLP programs is one other urgent problem to make sure equity and inclusivity in language processing.
Wanting forward, the way forward for NLP includes delving into much more subtle mechanisms. Hybrid fashions that mix statistical and symbolic approaches may present a deeper understanding of language. Moreover, leveraging multimodal info, comparable to combining textual content with pictures and audio, might enrich NLP’s means to know the complexities of human communication.
Code
Understanding the connection between phrases in Pure Language Processing (NLP) includes using numerous strategies and libraries in Python. Let’s discover a simplified instance of tips on how to create phrase embeddings and analyze their relationships utilizing Python code.
from gensim.fashions import Word2Vec
from sklearn.feature_extraction.textual content import CountVectorizer# Pattern sentences
sentences = [
"Natural language processing is a fascinating field.",
"NLP techniques enable machines to understand human language.",
"Word embeddings capture semantic relationships between words.",
"Machine learning plays a vital role in NLP.",
]
# Tokenize sentences
tokenized_sentences = [sentence.split() for sentence in sentences]
# Prepare Word2Vec mannequin
mannequin = Word2Vec(sentences=tokenized_sentences, vector_size=100, window=5, min_count=1, sg=0)
# Get phrase embeddings
word_embeddings = {}
for phrase in mannequin.wv.key_to_index:
word_embeddings[word] = mannequin.wv[word]
# Print phrase embeddings
for phrase, embedding in word_embeddings.objects():
print(f"{phrase}: {embedding}")
On this code snippet, we carry out the next steps:
- We use the
CountVectorizer
from thesklearn.feature_extraction.textual content
module to create a Bag-of-Phrases illustration of the given sentences. - We calculate the cosine similarity between the sentences utilizing the
cosine_similarity
perform fromsklearn.metrics.pairwise
. - We create phrase embeddings utilizing a simplified method by calculating the common cosine similarity for every phrase throughout all sentences.
Please word that this code snippet is a fundamental illustration and simplification of NLP strategies. Actual-world NLP functions typically contain extra advanced approaches like pre-trained phrase embeddings (e.g., Word2Vec, GloVe) and deep studying fashions (e.g., Transformers). These strategies present extra correct and contextually wealthy phrase embeddings, enabling a deeper understanding of the connections between phrases in NLP.
a: [-5.3333875e-04 2.3303551e-04 5.1019001e-03 9.0083890e-03
-9.3032550e-03 -7.1195369e-03 6.4584590e-03 8.9762164e-03
-5.0175036e-03 -3.7650447e-03 7.3785437e-03 -1.5340666e-03
-4.5384788e-03 6.5570017e-03 -4.8606656e-03 -1.8157157e-03
2.8783339e-03 9.9395879e-04 -8.2815485e-03 -9.4473567e-03
7.3133437e-03 5.0673201e-03 6.7566452e-03 7.6117041e-04
6.3521299e-03 -3.4057463e-03 -9.4886089e-04 5.7725017e-03
-7.5191013e-03 -3.9359326e-03 -7.5107487e-03 -9.2874235e-04
9.5370486e-03 -7.3206765e-03 -2.3336965e-03 -1.9391774e-03
8.0788182e-03 -5.9323125e-03 4.5708839e-05 -4.7547934e-03
-9.6041858e-03 5.0057843e-03 -8.7573798e-03 -4.3909233e-03
-3.5592173e-05 -2.9382799e-04 -7.6626795e-03 9.6147601e-03
4.9847029e-03 9.2323134e-03 -8.1605650e-03 4.4948743e-03
-4.1375738e-03 8.2572730e-04 8.4998477e-03 -4.4603520e-03
4.5165140e-03 -6.7866328e-03 -3.5455558e-03 9.4011584e-03
-1.5764335e-03 3.2316003e-04 -4.1407491e-03 -7.6800580e-03
-1.5068171e-03 2.4712002e-03 -8.8595285e-04 5.5362876e-03
-2.7429485e-03 2.2616391e-03 5.4578520e-03 8.3452510e-03
-1.4518319e-03 -9.2090825e-03 4.3735472e-03 5.7113857e-04
7.4420772e-03 -8.1154285e-04 -2.6389619e-03 -8.7550879e-03
-8.5779582e-04 2.8271980e-03 5.4003452e-03 7.0551792e-03
-5.7013375e-03 1.8575597e-03 6.0886922e-03 -4.7969352e-03
-3.1066921e-03 6.7949300e-03 1.6346385e-03 1.8852207e-04
3.4741641e-03 2.1873561e-04 9.6176472e-03 5.0612395e-03
-8.9171398e-03 -7.0427703e-03 9.0322795e-04 6.3942648e-03]
NLP.: [-8.6175092e-03 3.6633108e-03 5.1893806e-03 5.7446240e-03
7.4677323e-03 -6.1700242e-03 1.1069539e-03 6.0499595e-03
-2.8402037e-03 -6.1763264e-03 -4.1008633e-04 -8.3699869e-03
-5.6005958e-03 7.1078390e-03 3.3533720e-03 7.2261449e-03
6.8000825e-03 7.5324397e-03 -3.7872144e-03 -5.6032342e-04
2.3510726e-03 -4.5197862e-03 8.3880015e-03 -9.8578129e-03
6.7655714e-03 2.9138178e-03 -4.9357763e-03 4.3995976e-03
-1.7381383e-03 6.7096832e-03 9.9664060e-03 -4.3630265e-03
-5.9876911e-04 -5.6957500e-03 3.8516361e-03 2.7863435e-03
6.8928222e-03 6.1032670e-03 9.5405895e-03 9.2718694e-03
7.8985048e-03 -6.9913766e-03 -9.1558807e-03 -3.5431320e-04
-3.1017717e-03 7.8934915e-03 5.9360960e-03 -1.5453559e-03
1.5145623e-03 1.7906928e-03 7.8168763e-03 -9.5126815e-03
-2.0546117e-04 3.4698434e-03 -9.3725050e-04 8.3858781e-03
9.0113413e-03 6.5371152e-03 -7.0971088e-04 7.7114399e-03
-8.5352063e-03 3.2110326e-03 -4.6365261e-03 -5.0889538e-03
3.5879982e-03 5.3727766e-03 7.7699982e-03 -5.7654944e-03
7.4346717e-03 6.6252816e-03 -3.7079733e-03 -8.7472713e-03
5.4378728e-03 6.5099518e-03 -7.8398595e-04 -6.7107994e-03
-7.0875892e-03 -2.4956027e-03 5.1409635e-03 -3.6676642e-03
-9.3729021e-03 3.8280915e-03 4.8852302e-03 -6.4273207e-03
1.2095354e-03 -2.0732093e-03 2.5991441e-05 -9.8830890e-03
2.6899467e-03 -4.7510015e-03 1.0893322e-03 -1.5776546e-03
2.1969783e-03 -7.8782532e-03 -2.7162973e-03 2.6632904e-03
5.3470451e-03 -2.3928811e-03 -9.5117800e-03 4.5070518e-03]
human: [ 9.44193234e-05 3.07735056e-03 -6.81341998e-03 -1.37467124e-03
7.66940229e-03 7.34638190e-03 -3.67347687e-03 2.64397543e-03
-8.31821468e-03 6.20531896e-03 -4.63809539e-03 -3.16531723e-03
9.31177102e-03 8.74408172e-04 7.49155739e-03 -6.07502088e-03
5.16046258e-03 9.92457662e-03 -8.45787954e-03 -5.13567636e-03
-7.06536695e-03 -4.86320630e-03 -3.77919734e-03 -8.53672344e-03
7.95621052e-03 -4.84479778e-03 8.42375960e-03 5.26339049e-03
-6.55044708e-03 3.95782897e-03 5.47143584e-03 -7.42837740e-03
-7.40649924e-03 -2.47543608e-03 -8.62656254e-03 -1.58098224e-03
-4.02344856e-04 3.30102001e-03 1.44270272e-03 -8.81339016e-04
-5.59345772e-03 1.72931631e-03 -8.98367725e-04 6.79523638e-03
3.97346402e-03 4.52979514e-03 1.43355178e-03 -2.70039053e-03
-4.36620461e-03 -1.03235268e-03 1.43738755e-03 -2.64785299e-03
-7.07376329e-03 -7.80529575e-03 -9.12300032e-03 -5.93393249e-03
-1.84651744e-03 -4.32437053e-03 -6.46095490e-03 -3.71753098e-03
4.28954791e-03 -3.73825640e-03 8.37966613e-03 1.53344194e-03
-7.24321185e-03 9.43555124e-03 7.63214706e-03 5.49420156e-03
-6.84895134e-03 5.82303619e-03 4.00975626e-03 5.18535450e-03
4.25687339e-03 1.94030500e-03 -3.16919666e-03 8.35521612e-03
9.61214211e-03 3.79350688e-03 -2.83787074e-03 6.42196846e-06
1.21780089e-03 -8.45904183e-03 -8.22446588e-03 -2.31269601e-04
1.23726414e-03 -5.74342813e-03 -4.72575985e-03 -7.34690949e-03
8.32914561e-03 1.21552475e-04 -4.50941082e-03 5.70242992e-03
9.18052811e-03 -4.09980072e-03 7.96589907e-03 5.37635619e-03
5.88029576e-03 5.12286148e-04 8.21331143e-03 -7.01950071e-03]
language: [-8.2426779e-03 9.2993546e-03 -1.9766092e-04 -1.9672764e-03
4.6036304e-03 -4.0953159e-03 2.7431143e-03 6.9399667e-03
6.0654259e-03 -7.5107943e-03 9.3823504e-03 4.6718083e-03
3.9661205e-03 -6.2435055e-03 8.4599797e-03 -2.1501649e-03
8.8251876e-03 -5.3620026e-03 -8.1294188e-03 6.8245591e-03
1.6711927e-03 -2.1985089e-03 9.5136007e-03 9.4938548e-03
-9.7740470e-03 2.5052286e-03 6.1566923e-03 3.8724565e-03
2.0227872e-03 4.3050171e-04 6.7363144e-04 -3.8206363e-03
-7.1402504e-03 -2.0888723e-03 3.9238976e-03 8.8186832e-03
9.2591504e-03 -5.9759365e-03 -9.4026709e-03 9.7643770e-03
3.4297847e-03 5.1661171e-03 6.2823449e-03 -2.8042626e-03
7.3227035e-03 2.8302716e-03 2.8710044e-03 -2.3803699e-03
-3.1282497e-03 -2.3701417e-03 4.2764368e-03 7.6057913e-05
-9.5842788e-03 -9.6655441e-03 -6.1481940e-03 -1.2856961e-04
1.9974159e-03 9.4319675e-03 5.5843508e-03 -4.2906962e-03
2.7831673e-04 4.9643586e-03 7.6983096e-03 -1.1442233e-03
4.3234206e-03 -5.8143795e-03 -8.0419064e-04 8.1000505e-03
-2.3600650e-03 -9.6634552e-03 5.7792603e-03 -3.9298222e-03
-1.2228728e-03 9.9805174e-03 -2.2563506e-03 -4.7570644e-03
-5.3293873e-03 6.9808899e-03 -5.7088719e-03 2.1136629e-03
-5.2556600e-03 6.1207139e-03 4.3573068e-03 2.6063549e-03
-1.4910829e-03 -2.7460635e-03 8.9929365e-03 5.2157748e-03
-2.1625196e-03 -9.4703101e-03 -7.4260519e-03 -1.0637414e-03
-7.9494715e-04 -2.5629092e-03 9.6827205e-03 -4.5852066e-04
5.8737611e-03 -7.4475873e-03 -2.5060738e-03 -5.5498634e-03]
processing: [-0.00713902 0.00124103 -0.00717672 -0.00224462 0.0037193 0.00583312
0.00119818 0.00210273 -0.00411039 0.00722533 -0.00630704 0.00464722
-0.00821997 0.00203647 -0.00497705 -0.00424769 -0.00310898 0.00565521
0.0057984 -0.00497465 0.00077333 -0.00849578 0.00780981 0.00925729
-0.00274233 0.00080022 0.00074665 0.00547788 -0.00860608 0.00058446
0.00686942 0.00223159 0.00112468 -0.00932216 0.00848237 -0.00626413
-0.00299237 0.00349379 -0.00077263 0.00141129 0.00178199 -0.0068289
-0.00972481 0.00904058 0.00619805 -0.00691293 0.00340348 0.00020606
0.00475375 -0.00711994 0.00402695 0.00434743 0.00995737 -0.00447374
-0.00138926 -0.00731732 -0.00969783 -0.00908026 -0.00102275 -0.00650329
0.00484973 -0.00616403 0.00251919 0.00073944 -0.00339215 -0.00097922
0.00997913 0.00914589 -0.00446183 0.00908303 -0.00564176 0.00593092
-0.00309722 0.00343175 0.00301723 0.00690046 -0.00237388 0.00877504
0.00758943 -0.00954765 -0.00800821 -0.0076379 0.00292326 -0.00279472
-0.00692952 -0.00812826 0.00830918 0.00199049 -0.00932802 -0.00479272
0.00313674 -0.00471321 0.00528084 -0.00423344 0.0026418 -0.00804569
0.00620989 0.00481889 0.00078719 0.00301345]
is: [-8.7258397e-03 2.1301524e-03 -8.7468367e-04 -9.3181916e-03
-9.4254091e-03 -1.4101878e-03 4.4330526e-03 3.7057200e-03
-6.4999410e-03 -6.8733180e-03 -4.9997573e-03 -2.2890654e-03
-7.2486643e-03 -9.6024759e-03 -2.7421692e-03 -8.3631864e-03
-6.0385126e-03 -5.6688520e-03 -2.3446404e-03 -1.7078688e-03
-8.9563560e-03 -7.3482783e-04 8.1514064e-03 7.6887310e-03
-7.2053159e-03 -3.6671250e-03 3.1189646e-03 -9.5701450e-03
1.4765476e-03 6.5232627e-03 5.7474496e-03 -8.7652551e-03
-4.5180107e-03 -8.1403330e-03 4.4095370e-05 9.2630880e-03
5.9743887e-03 5.0695469e-03 5.0614243e-03 -3.2442710e-03
9.5520429e-03 -7.3571061e-03 -7.2698258e-03 -2.2625590e-03
-7.7776785e-04 -3.2155067e-03 -5.9463969e-04 7.4878964e-03
-6.9633586e-04 -1.6251151e-03 2.7438377e-03 -8.3604930e-03
7.8554545e-03 8.5340161e-03 -9.5851719e-03 2.4467555e-03
9.9049499e-03 -7.6663699e-03 -6.9666589e-03 -7.7370740e-03
8.3961952e-03 -6.8093726e-04 9.1477064e-03 -8.1567550e-03
3.7407244e-03 2.6382781e-03 7.4296095e-04 2.3302266e-03
-7.4703041e-03 -9.3576647e-03 2.3554824e-03 6.1486042e-03
7.9875765e-03 5.7363971e-03 -7.7669002e-04 8.3065545e-03
-9.3344208e-03 3.4069051e-03 2.6478071e-04 3.8559781e-03
7.3841196e-03 -6.7270240e-03 5.5829501e-03 -9.5221633e-03
-8.0333085e-04 -8.6885504e-03 -5.0986018e-03 9.2884907e-03
-1.8579517e-03 2.9137982e-03 9.0716463e-03 8.9389104e-03
-8.2062297e-03 -3.0104099e-03 9.8887896e-03 5.1056840e-03
-1.5869371e-03 -8.6912634e-03 2.9625429e-03 -6.6764285e-03]
fascinating: [ 8.13227147e-03 -4.45733406e-03 -1.06835726e-03 1.00636482e-03
-1.91113955e-04 1.14817743e-03 6.11386076e-03 -2.02715401e-05
-3.24596534e-03 -1.51072862e-03 5.89729892e-03 1.51410222e-03
-7.24261976e-04 9.33324732e-03 -4.92128357e-03 -8.38409644e-04
9.17541143e-03 6.74942741e-03 1.50285603e-03 -8.88256077e-03
1.14874600e-03 -2.28825561e-03 9.36823711e-03 1.20992784e-03
1.49006362e-03 2.40640994e-03 -1.83600665e-03 -4.99963388e-03
2.32429506e-04 -2.01418041e-03 6.60093315e-03 8.94012302e-03
-6.74754381e-04 2.97701475e-03 -6.10765442e-03 1.69932481e-03
-6.92623248e-03 -8.69402662e-03 -5.90020278e-03 -8.95647518e-03
7.27759488e-03 -5.77203138e-03 8.27635173e-03 -7.24354526e-03
3.42167495e-03 9.67499893e-03 -7.78544787e-03 -9.94505733e-03
-4.32914635e-03 -2.68313056e-03 -2.71289347e-04 -8.83155130e-03
-8.61755759e-03 2.80021061e-03 -8.20640661e-03 -9.06933658e-03
-2.34046578e-03 -8.63180775e-03 -7.05664977e-03 -8.40115082e-03
-3.01328895e-04 -4.56429832e-03 6.62717456e-03 1.52716041e-03
-3.34147573e-03 6.10897178e-03 -6.01328490e-03 -4.65616956e-03
-7.20750913e-03 -4.33658017e-03 -1.80932996e-03 6.48964290e-03
-2.77039292e-03 4.91896737e-03 6.90444233e-03 -7.46370573e-03
4.56485013e-03 6.12697843e-03 -2.95447465e-03 6.62502181e-03
6.12587947e-03 -6.44348515e-03 -6.76455162e-03 2.53895880e-03
-1.62381888e-03 -6.06512791e-03 9.49920900e-03 -5.13014663e-03
-6.55409694e-03 -1.19885204e-04 -2.70142802e-03 4.44400299e-04
-3.53745813e-03 -4.19330609e-04 -7.08615757e-04 8.22820642e-04
8.19481723e-03 -5.73670724e-03 -1.65952800e-03 5.57160750e-03]
subject.: [ 8.1663420e-03 -4.4396902e-03 8.9876261e-03 8.2574263e-03
-4.4357465e-03 3.0489507e-04 4.2783278e-03 -3.9287945e-03
-5.5601797e-03 -6.5122712e-03 -6.6888577e-04 -2.9651503e-04
4.4663572e-03 -2.4753483e-03 -1.7063538e-04 2.4623766e-03
4.8666378e-03 -3.3029344e-05 -6.3426611e-03 -9.2623262e-03
2.6616504e-05 6.6660992e-03 1.4671349e-03 -8.9673456e-03
-7.9401266e-03 6.5535037e-03 -3.7865029e-03 6.2506427e-03
-6.6809170e-03 8.4788846e-03 -6.5163253e-03 3.2858211e-03
-1.0544884e-03 -6.7850319e-03 -3.2888285e-03 -1.1586336e-03
-5.4725907e-03 -1.2102786e-03 -7.5633610e-03 2.6444606e-03
9.0706926e-03 -2.3748938e-03 -9.7681733e-04 3.5141723e-03
8.6648762e-03 -5.9233177e-03 -6.8880948e-03 -2.9333995e-03
9.1473032e-03 8.6618593e-04 -8.6794095e-03 -1.4474445e-03
9.4789062e-03 -7.5512892e-03 -5.3565311e-03 9.3177045e-03
-8.9722676e-03 3.8264850e-03 6.6742010e-04 6.6588675e-03
8.3107157e-03 -2.8531379e-03 -3.9908825e-03 8.8962922e-03
2.0877330e-03 6.2492229e-03 -9.4490480e-03 9.5901107e-03
-1.3507534e-03 -6.0530081e-03 2.9894845e-03 -4.5610560e-04
4.7074654e-03 -2.2822993e-03 -4.1404716e-03 2.2768518e-03
8.3534298e-03 -4.9972055e-03 2.6664457e-03 -7.9914862e-03
-6.7745224e-03 -4.6887540e-04 -8.7654367e-03 2.7893758e-03
1.6000605e-03 -2.3187960e-03 5.0044842e-03 9.7466251e-03
8.4531214e-03 -1.8793929e-03 2.0562594e-03 -4.0032291e-03
-8.2429824e-03 6.2791971e-03 -1.9484435e-03 -6.6629995e-04
-1.7725073e-03 -4.5329332e-03 4.0627248e-03 -4.2700241e-03]
NLP: [-9.5799612e-03 8.9453813e-03 4.1636624e-03 9.2357155e-03
6.6467929e-03 2.9273708e-03 9.8044006e-03 -4.4245184e-03
-6.8068192e-03 4.2298706e-03 3.7281774e-03 -5.6664092e-03
9.7090025e-03 -3.5585822e-03 9.5530814e-03 8.3303836e-04
-6.3378708e-03 -1.9744523e-03 -7.3806914e-03 -2.9815054e-03
1.0397449e-03 9.4826641e-03 9.3561290e-03 -6.5994198e-03
3.4780500e-03 2.2744671e-03 -2.4872122e-03 -9.2289913e-03
1.0253255e-03 -8.1657544e-03 6.3227746e-03 -5.8031715e-03
5.5340622e-03 9.8344656e-03 -1.6259975e-04 4.5287027e-03
-1.8097934e-03 7.3628551e-03 3.9411210e-03 -9.0119448e-03
-2.4005356e-03 3.6298323e-03 -9.9851291e-05 -1.1994235e-03
-1.0544112e-03 -1.6705011e-03 6.0547196e-04 4.1649169e-03
-4.2547360e-03 -3.8345074e-03 -5.2395782e-05 2.6860635e-04
-1.7094372e-04 -4.7885580e-03 4.3113288e-03 -2.1740186e-03
2.1033050e-03 6.6533248e-04 5.9686475e-03 -6.8445215e-03
-6.8154563e-03 -4.4780485e-03 9.4397515e-03 -1.5916645e-03
-9.4328253e-03 -5.4230710e-04 -4.4473149e-03 6.0026231e-03
-9.5871743e-03 2.8611703e-03 -9.2530297e-03 1.2515374e-03
6.0013728e-03 7.3990412e-03 -7.6235584e-03 -6.0514412e-03
-6.8366015e-03 -7.9184007e-03 -9.5013585e-03 -2.1258150e-03
-8.3569455e-04 -7.2598201e-03 6.7856037e-03 1.1197194e-03
5.8301142e-03 1.4713737e-03 7.8807393e-04 -7.3714331e-03
-2.1744994e-03 4.3217666e-03 -5.0874273e-03 1.1326622e-03
2.8865393e-03 -1.5378165e-03 9.9361697e-03 8.3524976e-03
2.4177858e-03 7.1194712e-03 5.8947774e-03 -5.5835536e-03]
strategies: [-0.00515624 -0.00666834 -0.00777684 0.00831073 -0.00198234 -0.00685496
-0.00415439 0.00514413 -0.00286914 -0.00374966 0.00162143 -0.00277629
-0.00158436 0.00107449 -0.00297794 0.00851928 0.00391094 -0.00995886
0.0062596 -0.00675425 0.00076943 0.00440423 -0.00510337 -0.00211067
0.00809548 -0.00424379 -0.00763626 0.00925791 -0.0021555 -0.00471943
0.0085708 0.00428334 0.00432484 0.00928451 -0.00845308 0.00525532
0.00203935 0.00418828 0.0016979 0.00446413 0.00448629 0.00610452
-0.0032021 -0.00457573 -0.00042652 0.00253373 -0.00326317 0.00605772
0.00415413 0.00776459 0.00256927 0.00811668 -0.00138721 0.00807793
0.00371702 -0.00804732 -0.00393361 -0.00247188 0.00489304 -0.00087216
-0.00283091 0.00783371 0.0093229 -0.00161493 -0.00515925 -0.00470176
-0.00484605 -0.00960283 0.00137202 -0.00422492 0.00252671 0.00561448
-0.00406591 -0.00959658 0.0015467 -0.00670012 0.00249517 -0.00378063
0.00707842 0.00064022 0.00356094 -0.00273913 -0.00171055 0.00765279
0.00140768 -0.00585045 -0.0078345 0.00123269 0.00645463 0.00555635
-0.00897705 0.00859216 0.00404698 0.00746961 0.00974633 -0.00728958
-0.00903996 0.005836 0.00939121 0.00350693]
allow: [ 7.0881094e-03 -1.5676371e-03 7.9476098e-03 -9.4874389e-03
-8.0289468e-03 -6.6400054e-03 -4.0030703e-03 4.9895630e-03
-3.8138551e-03 -8.3195325e-03 8.4117642e-03 -3.7476455e-03
8.6094094e-03 -4.8953048e-03 3.9187749e-03 4.9214847e-03
2.3921954e-03 -2.8185851e-03 2.8485074e-03 -8.2564894e-03
-2.7655631e-03 -2.5907531e-03 7.2490349e-03 -3.4637495e-03
-6.6001634e-03 4.3398454e-03 -4.7428612e-04 -3.5974374e-03
6.8819579e-03 3.8719615e-03 -3.8997156e-03 7.7064527e-04
9.1434345e-03 7.7553038e-03 6.3613174e-03 4.6681403e-03
2.3850549e-03 -1.8407544e-03 -6.3711358e-03 -3.0139304e-04
-1.5645163e-03 -5.7256845e-04 -6.2639816e-03 7.4345334e-03
-6.5915473e-03 -7.2395876e-03 -2.7573761e-03 -1.5158756e-03
-7.6355296e-03 6.9826649e-04 -5.3255013e-03 -1.2763174e-03
-7.3646368e-03 1.9606508e-03 3.2725660e-03 -2.2311828e-05
-5.4475311e-03 -1.7262391e-03 7.0845345e-03 3.7355043e-03
-8.8814460e-03 -3.4135687e-03 2.3546158e-03 2.1370039e-03
-9.4650034e-03 4.5718024e-03 -8.6570438e-03 -7.3871780e-03
3.4830503e-03 -3.4707533e-03 3.5642779e-03 8.8940049e-03
-3.5740838e-03 9.3206335e-03 1.7111457e-03 9.8479753e-03
5.7050837e-03 -9.1494620e-03 -3.3284177e-03 6.5301773e-03
5.6020236e-03 8.7054819e-03 6.9260616e-03 8.0386680e-03
-9.8234769e-03 4.2991517e-03 -5.0305394e-03 3.5118065e-03
6.0566403e-03 4.3931478e-03 7.5118807e-03 1.4977980e-03
-1.2650257e-03 5.7680784e-03 -5.6389249e-03 3.9005994e-05
9.4572147e-03 -5.4808962e-03 3.8142309e-03 -8.1132660e-03]
machines: [ 9.7702928e-03 8.1651136e-03 1.2809718e-03 5.0975787e-03
1.4081288e-03 -6.4551616e-03 -1.4280510e-03 6.4491653e-03
-4.6173059e-03 -3.9930656e-03 4.9244044e-03 2.7130984e-03
-1.8479753e-03 -2.8769434e-03 6.0107317e-03 -5.7167388e-03
-3.2367026e-03 -6.4878250e-03 -4.2346325e-03 -8.5809948e-03
-4.4697891e-03 -8.5112294e-03 1.4037776e-03 -8.6181965e-03
-9.9166557e-03 -8.2016252e-03 -6.7726658e-03 6.6805850e-03
3.7845564e-03 3.5616636e-04 -2.9579818e-03 -7.4283206e-03
5.3341867e-04 4.9989222e-04 1.9561886e-04 8.5259555e-04
7.8633073e-04 -6.8160298e-05 -8.0070542e-03 -5.8702733e-03
-8.3829118e-03 -1.3120425e-03 1.8206370e-03 7.4171280e-03
-1.9634271e-03 -2.3252917e-03 9.4871549e-03 7.9704521e-05
-2.4045217e-03 8.6048469e-03 2.6870037e-03 -5.3439722e-03
6.5881060e-03 4.5101536e-03 -7.0544672e-03 -3.2317400e-04
8.3448651e-04 5.7473574e-03 -1.7176545e-03 -2.8065301e-03
1.7484308e-03 8.4717153e-04 1.1928272e-03 -2.6342822e-03
-5.9857843e-03 7.3229838e-03 7.5873756e-03 8.2963575e-03
-8.5988473e-03 2.6364254e-03 -3.5599626e-03 9.6204039e-03
2.9037679e-03 4.6411133e-03 2.3856151e-03 6.6084778e-03
-5.7432903e-03 7.8944126e-03 -2.4109220e-03 -4.5618857e-03
-2.0609903e-03 9.7335577e-03 -6.8565905e-03 -2.1917201e-03
7.0009995e-03 -5.5749417e-05 -6.2949671e-03 -6.3935257e-03
8.9403950e-03 6.4295758e-03 4.7735930e-03 -3.2620477e-03
-9.2676198e-03 3.7868882e-03 7.1605504e-03 -5.6328895e-03
-7.8650126e-03 -2.9727400e-03 -4.9318983e-03 -2.3151112e-03]
to: [-1.9442164e-03 -5.2675214e-03 9.4471136e-03 -9.2987325e-03
4.5039477e-03 5.4041781e-03 -1.4092624e-03 9.0070926e-03
9.8853596e-03 -5.4750429e-03 -6.0210000e-03 -6.7469729e-03
-7.8948820e-03 -3.0479168e-03 -5.5940272e-03 -8.3446801e-03
7.8290224e-04 2.9946566e-03 6.4147436e-03 -2.6289499e-03
-4.4534765e-03 1.2495709e-03 3.9146186e-04 8.1169987e-03
1.8280029e-04 7.2315861e-03 -8.2645155e-03 8.4335366e-03
-1.8889094e-03 8.7011540e-03 -7.6168370e-03 1.7963862e-03
1.0564864e-03 4.6005251e-05 -5.1032533e-03 -9.2476979e-03
-7.2642174e-03 -7.9511739e-03 1.9137275e-03 4.7846674e-04
-1.8131376e-03 7.1201660e-03 -2.4756920e-03 -1.3473093e-03
-8.9005642e-03 -9.9254129e-03 8.9493981e-03 -5.7539381e-03
-6.3729975e-03 5.1994072e-03 6.6699935e-03 -6.8316413e-03
9.5975993e-04 -6.0084737e-03 1.6473436e-03 -4.2892788e-03
-3.4407973e-03 2.1856665e-03 8.6615775e-03 6.7281104e-03
-9.6770572e-03 -5.6221043e-03 7.8803329e-03 1.9893574e-03
-4.2560520e-03 5.9881213e-04 9.5209610e-03 -1.1027169e-03
-9.4246380e-03 1.6084099e-03 6.2323548e-03 6.2823701e-03
4.0916502e-03 -5.6502391e-03 -3.7069322e-04 -5.5317880e-05
4.5717955e-03 -8.0415895e-03 -8.0183093e-03 2.6475071e-04
-8.6082993e-03 5.8201565e-03 -4.1781188e-04 9.9711772e-03
-5.3439774e-03 -4.8613906e-04 7.7567734e-03 -4.0679323e-03
-5.0159004e-03 1.5900708e-03 2.6506938e-03 -2.5649595e-03
6.4475285e-03 -7.6599526e-03 3.3935606e-03 4.8997044e-04
8.7321829e-03 5.9827138e-03 6.8153618e-03 7.8225443e-03]
perceive: [-0.00949782 0.00956121 -0.00777264 -0.00264558 -0.00490453 -0.00496711
-0.0080234 -0.00778158 -0.0045547 -0.00127588 -0.00510397 0.0061391
-0.00951576 -0.00530582 0.00943835 0.00699079 0.00767672 0.00423692
0.00050848 -0.00598064 0.00601942 0.00263388 0.00769782 0.00639216
0.00794354 0.00865667 -0.00989638 -0.00675386 0.00133902 0.00643931
0.00737491 0.00551599 0.00766038 -0.00512568 0.00658301 -0.00410944
-0.00905435 0.00914295 0.00133209 -0.00276098 -0.00247831 -0.00422127
0.00481413 0.00440253 -0.00265326 -0.00734067 -0.00356754 -0.00033724
0.00609725 -0.0028381 -0.00012198 0.00087866 -0.00709622 0.00206384
-0.00143288 0.00280288 0.00484189 -0.00135211 -0.00277861 0.00773875
0.00504617 0.00671437 0.00451826 0.00866917 0.00747355 -0.00107931
0.0087489 0.0046042 0.00543951 -0.00138518 -0.00204014 -0.00442472
-0.00851327 0.00303791 0.00888478 0.00892012 -0.00194128 0.00608772
0.00377771 -0.00429718 0.00204153 -0.0054389 0.00820757 0.00543404
0.00318622 0.00410227 0.00865714 0.00727214 -0.00083305 -0.00707414
0.00838164 0.00723361 0.00173213 -0.00134586 -0.00588883 -0.00453226
0.00864927 -0.00313468 -0.00633711 0.00987007]
language.: [ 7.6987892e-03 9.1190459e-03 1.1335011e-03 -8.3263842e-03
8.4257675e-03 -3.6958090e-03 5.7408861e-03 4.3924907e-03
9.6894996e-03 -9.2935096e-03 9.2069115e-03 -9.2812423e-03
-6.9072060e-03 -9.1014244e-03 -5.5466606e-03 7.3680999e-03
9.1654081e-03 -3.3238134e-03 3.7242549e-03 -3.6245005e-03
7.8809001e-03 5.8648181e-03 -1.9316781e-06 -3.6290165e-03
-7.2238306e-03 4.7677755e-03 1.4534076e-03 -2.6115410e-03
7.8382315e-03 -4.0488844e-03 -9.1483239e-03 -2.2554717e-03
1.2327240e-04 -6.6399481e-03 -5.4874248e-03 -8.5007027e-03
9.2296833e-03 7.4241711e-03 -2.9520533e-04 7.3674382e-03
7.9503646e-03 -7.8417920e-04 6.6133919e-03 3.7690278e-03
5.0770226e-03 7.2534825e-03 -4.7397786e-03 -2.1864520e-03
8.7373267e-04 4.2358171e-03 3.3040193e-03 5.0950726e-03
4.5857453e-03 -8.4390268e-03 -3.1850471e-03 -7.2363615e-03
9.6802264e-03 5.0063310e-03 1.7072864e-04 4.1127573e-03
-7.6546306e-03 -6.2938114e-03 3.0774672e-03 6.5361210e-03
3.9494443e-03 6.0195574e-03 -1.9847380e-03 -3.3443628e-03
2.0707792e-04 -3.1941298e-03 -5.5151125e-03 -7.7885482e-03
6.5358258e-03 -1.0905024e-03 -1.8897548e-03 -7.8034978e-03
9.3387906e-03 8.6992333e-04 1.7693446e-03 2.4916839e-03
-7.3860027e-03 1.6384044e-03 2.9745693e-03 -8.5665677e-03
4.9563940e-03 2.4326625e-03 7.4973046e-03 5.0450605e-03
-3.0309223e-03 -7.1641533e-03 7.0968526e-03 1.9016094e-03
5.2000149e-03 6.3820011e-03 1.9120963e-03 -6.1279130e-03
-5.4757797e-06 8.2677864e-03 -6.0976790e-03 9.4377669e-03]
in: [-7.1897185e-03 4.2314394e-03 2.1636037e-03 7.4397395e-03
-4.8917029e-03 -4.5655328e-03 -6.0993149e-03 3.2993923e-03
-4.4976235e-03 8.5223308e-03 -4.2889020e-03 -9.1043115e-03
-4.8187235e-03 6.4167185e-03 -6.3739768e-03 -5.2614748e-03
-7.3049562e-03 6.0211224e-03 3.3599336e-03 2.8495679e-03
-3.1380975e-03 6.0308422e-03 -6.1541284e-03 -1.9778076e-03
-5.9851813e-03 -9.9551654e-04 -2.0215588e-03 8.4866015e-03
7.8789897e-05 -8.5755121e-03 -5.4313727e-03 -6.8743988e-03
2.6927772e-03 9.4564706e-03 -5.8153514e-03 8.2649253e-03
8.5323667e-03 -7.0646829e-03 -8.8848351e-03 9.4704637e-03
8.3753951e-03 -4.6914192e-03 -6.7257718e-03 7.8417799e-03
3.7633430e-03 8.0951676e-03 -7.5724060e-03 -9.5256558e-03
1.5784280e-03 -9.8057427e-03 -4.8866752e-03 -3.4594447e-03
9.6223280e-03 8.6254124e-03 -2.8351021e-03 5.8276942e-03
8.2370052e-03 -2.2629448e-03 9.5290961e-03 7.1615041e-03
2.0423457e-03 -3.8481501e-03 -5.0840639e-03 -3.0515301e-03
7.8902310e-03 -6.1921976e-03 -2.9159696e-03 9.1902763e-03
3.4585109e-03 6.0714865e-03 -8.0324179e-03 -7.5190753e-04
5.5211512e-03 -4.7161952e-03 7.4801832e-03 9.3200691e-03
-4.0938787e-04 -2.0631021e-03 -5.9202989e-04 -5.7856725e-03
-8.3862180e-03 -1.5051659e-03 -2.5573627e-03 4.3828301e-03
-6.8688071e-03 5.4145656e-03 -6.7449459e-03 -7.8183161e-03
8.4712431e-03 8.9187231e-03 -3.4802677e-03 3.4908105e-03
-5.7976730e-03 -8.7494776e-03 -5.5180090e-03 6.7471857e-03
6.4167455e-03 9.4377194e-03 7.0543461e-03 6.7566391e-03]
Phrase: [ 1.3007250e-03 -9.8054139e-03 4.5886864e-03 -5.3588412e-04
6.3343029e-03 1.7836818e-03 -3.1279717e-03 7.7629215e-03
1.5526216e-03 5.5580949e-05 -4.6128184e-03 -8.4565571e-03
-7.7649811e-03 8.6731678e-03 -8.9248372e-03 9.0339165e-03
-9.2820823e-03 -2.7520378e-04 -1.9084162e-03 -8.9317793e-03
8.6303325e-03 6.7780260e-03 3.0194642e-03 4.8307069e-03
1.1338706e-04 9.4236070e-03 7.0222099e-03 -9.8522808e-03
-4.4339355e-03 -1.2919438e-03 3.0485794e-03 -4.3265410e-03
1.4486337e-03 -7.8454977e-03 2.7764551e-03 4.7036163e-03
4.9397880e-03 -3.1759029e-03 -8.4265210e-03 -9.2221964e-03
-7.2370173e-04 -7.3274514e-03 -6.8164603e-03 6.1208899e-03
7.1728951e-03 2.1194136e-03 -7.9003870e-03 -5.6988113e-03
8.0521284e-03 3.9210520e-03 -5.2415901e-03 -7.3934235e-03
7.7151501e-04 3.4629810e-03 2.0798312e-03 3.1009745e-03
-5.6207078e-03 -9.8903673e-03 -7.0199841e-03 2.2983887e-04
4.6178852e-03 4.5259167e-03 1.8812226e-03 5.1698526e-03
-1.0797157e-04 4.1163638e-03 -9.1237910e-03 7.7032279e-03
6.1456882e-03 5.1263226e-03 7.2073960e-03 8.4412554e-03
7.4154628e-04 -1.7038133e-03 5.1806052e-04 -9.3182353e-03
8.4071318e-03 -6.3810083e-03 8.4259016e-03 -4.2459215e-03
6.4540416e-04 -9.1652796e-03 -9.5598986e-03 -7.8367023e-03
-7.7309520e-03 3.7489968e-04 -7.2278837e-03 -4.9534393e-03
-5.2713281e-03 -4.2884308e-03 7.0115901e-03 4.8291483e-03
8.6846845e-03 7.0938440e-03 -5.6917588e-03 7.2439536e-03
-9.2954803e-03 -2.5871461e-03 -7.7552246e-03 4.1914610e-03]
embeddings: [ 0.00180023 0.00704609 0.0029447 -0.00698085 0.00771268 -0.00598893
0.00899771 0.0029592 -0.00401529 -0.00468899 -0.00441672 -0.00614646
0.00937874 -0.0026496 0.00777244 -0.00968034 0.00210879 -0.00123361
0.00754423 -0.0090546 0.00743756 -0.0051058 -0.00601377 -0.00564916
-0.00337917 -0.0034111 -0.00319566 -0.0074922 0.00070878 -0.00057607
-0.001684 0.00375713 -0.00762019 -0.00322142 0.00515534 0.00854386
-0.00980994 0.00719534 0.00530949 -0.0038797 0.00857616 -0.00922199
0.00724868 0.00536383 0.00129359 -0.00519975 -0.00417865 -0.00335678
0.00160829 0.0015867 0.00738824 0.00997759 0.00886734 -0.00400645
0.00964539 -0.00062954 0.00486543 0.00254902 -0.00062981 0.00366745
-0.00531941 -0.00575668 -0.00760464 0.00190643 0.00652587 0.00088213
0.00125695 0.0031716 0.00813467 -0.00770006 0.00226075 -0.00747411
0.00370981 0.00951055 0.00752026 0.00642603 0.00801478 0.00655115
0.00685668 0.00868209 -0.00494804 0.00921295 0.0050592 -0.00213025
0.00848745 0.00508134 0.00964895 0.0028324 0.00986754 0.001197
0.00912918 0.00358697 0.00656481 -0.00361133 0.00679291 0.00724357
-0.00213346 -0.00185955 0.00361175 -0.00703643]
seize: [ 0.00973602 -0.00977937 -0.00650196 0.00278474 0.00643469 -0.00536453
0.00275115 0.00912227 -0.0068169 -0.00609816 -0.00499056 -0.00367744
0.00185328 0.00968347 0.00644039 0.00039444 0.00247165 0.00844416
0.00912556 0.00562718 0.00594402 -0.00762168 -0.00383015 -0.00568155
0.00618395 -0.00225874 -0.00877625 0.00762048 0.00839651 -0.00331967
0.00911822 -0.00074194 -0.00362871 -0.00038513 0.00019132 -0.00350501
0.00281351 0.00573218 0.00686964 -0.00890338 -0.00219399 -0.00548161
0.00751951 0.00650499 -0.00435981 0.00232675 -0.00595422 0.00023506
0.00946106 -0.00260937 -0.00518636 -0.00739904 -0.00291398 -0.00086707
0.00352428 0.00974116 -0.00338925 0.00189998 0.00967776 0.00152972
0.00098774 0.00980245 0.00929886 0.00770726 -0.00617412 0.00998793
0.00585097 0.00907374 -0.00199635 0.0033508 0.0068356 -0.00389223
0.00664307 0.00256336 0.00931377 -0.00303183 -0.00310608 0.00621735
-0.00907981 -0.0072541 -0.00650046 -0.00075142 -0.00236582 0.00681489
0.00923587 -0.00091004 0.00141184 0.00201782 -0.0020179 -0.00803316
0.00743873 -0.00429571 0.00457941 0.00908973 0.00304662 0.00313993
0.00406398 -0.00270135 0.00382579 0.00033513]
semantic: [ 5.6228777e-03 5.5020535e-03 1.8311220e-03 5.7502794e-03
-8.9692976e-03 6.5621212e-03 9.2270048e-03 -4.2123767e-03
1.6101038e-03 -5.2321977e-03 1.0604371e-03 2.7716705e-03
8.1622582e-03 5.3962006e-04 2.5576625e-03 1.2983738e-03
8.4004402e-03 -5.7116416e-03 -6.2651639e-03 -3.6290803e-03
-2.3017516e-03 5.0456920e-03 -8.1186127e-03 -2.8309515e-03
-8.1999348e-03 5.1516681e-03 -2.5668128e-03 -9.0733944e-03
4.0703858e-03 9.0172011e-03 -3.0389878e-03 -5.8390344e-03
3.0224479e-03 -4.3338252e-04 -9.9789463e-03 8.4198648e-03
-7.3418394e-03 -4.9293605e-03 -2.6584044e-03 -5.4519861e-03
1.7175350e-03 9.7150328e-03 4.5712078e-03 8.0873873e-03
-4.7016723e-04 6.4170669e-04 -2.6670012e-03 -8.7797865e-03
3.4286624e-03 2.0935256e-03 -9.4200028e-03 -4.9667489e-03
-9.7335512e-03 -5.7206647e-03 4.0643569e-03 8.6413417e-03
4.1130167e-03 2.3885781e-03 8.1432229e-03 -1.1219213e-03
-1.3991265e-03 -8.7494496e-03 -1.2599598e-04 -2.5697211e-03
3.8601001e-04 7.2767041e-03 -7.0448681e-03 -3.9492925e-03
-6.6649006e-03 -3.5465350e-03 -3.3196155e-03 2.1375422e-03
3.3257795e-03 -4.9562491e-03 -4.5497702e-03 1.1389250e-03
5.4523298e-03 5.3714258e-03 -2.9678326e-03 -4.2643957e-03
-5.6150286e-03 -5.4582860e-04 1.9489392e-03 1.5232505e-03
7.3514604e-03 -2.7316210e-03 -6.5201442e-05 -5.5279383e-03
-1.1713494e-03 -7.7097029e-03 -9.6214766e-04 1.3112257e-03
-8.5967965e-03 8.7479064e-03 -9.2082769e-03 -9.6263196e-03
-8.5124075e-03 7.3156250e-03 5.4639177e-03 9.2489058e-03]
relationships: [ 0.0025687 0.00084741 -0.00253774 0.00935929 0.00275732 0.00409495
-0.00118087 0.00090342 0.00662457 -0.00072683 0.0033428 -0.00067239
0.00524842 0.00363925 0.00258282 -0.00530882 -0.00470987 0.00430617
-0.00590697 -0.00017986 -0.00063225 0.00349545 -0.00844025 0.00881756
-0.00144946 -0.00532982 0.00405277 -0.00193772 -0.0077643 -0.00449866
-0.00038762 -0.0089462 0.00057256 0.00244368 -0.00322395 0.00257134
0.00248058 0.00998882 0.00143088 0.0020193 0.00278007 -0.00207759
-0.00869849 0.00802193 -0.00197548 -0.00969328 -0.00655214 -0.0039448
0.00395438 0.00503816 0.00608578 -0.00676981 0.00068992 -0.00277479
-0.00520711 0.00698187 0.00395258 -0.00310573 -0.00827499 -0.00514125
-0.00065124 0.00781167 0.00604432 -0.00845214 -0.00956384 0.00713228
-0.00232944 -0.00369225 0.00574944 -0.00584478 0.00509192 -0.00024304
-0.00687491 -0.00033081 0.00635832 0.00929171 0.00221837 0.00504829
-0.00497553 -0.00079788 -0.00531795 0.00118918 -0.00179089 -0.00363243
-0.00701368 0.00965555 0.00297669 -0.0022812 -0.00418572 0.00771443
-0.00648193 0.00312082 0.00078636 0.00832329 0.00683645 -0.00290821
0.00253455 -0.00166507 -0.00945505 -0.00261322]
between: [ 1.3325238e-03 6.5408563e-03 9.9846032e-03 9.0624550e-03
-8.0153607e-03 6.4913859e-03 -5.7147373e-03 -9.7157480e-04
4.8282265e-04 6.5819337e-03 4.4701435e-03 4.6037268e-03
9.4831241e-03 3.8266421e-04 -6.0387133e-03 -6.3301004e-03
6.4317896e-03 -5.2425815e-03 -2.8498126e-03 4.0752841e-03
-2.2902358e-03 -6.0252128e-03 -2.3236549e-03 1.2069190e-03
2.1833598e-03 6.0837734e-03 -5.2140011e-03 3.0779613e-03
7.2406759e-03 2.1951138e-03 5.3974902e-03 -4.8453333e-03
6.1526122e-03 -7.6012816e-03 3.4928655e-03 -9.3218042e-03
-2.6043104e-03 -9.0731988e-03 -1.5882683e-03 -5.3647519e-03
-3.9439187e-03 1.1536527e-03 2.8003477e-03 -1.5263951e-03
-8.1705153e-03 -5.9180222e-03 8.1929564e-04 -3.9462578e-03
-9.4304476e-03 -7.7497482e-04 6.6332687e-03 5.9788441e-03
-9.9172592e-03 3.1185830e-03 -5.9873010e-03 -9.1818906e-03
1.7021298e-04 -3.6962033e-04 -6.9719995e-03 -6.2800576e-03
-2.4260855e-03 7.0966566e-03 -7.5458791e-03 7.6980842e-03
-4.7544480e-04 1.0932934e-03 9.4826613e-03 4.7281599e-03
-3.5727667e-03 3.7356198e-03 3.5192859e-03 6.3366974e-03
6.9339272e-05 -4.4236863e-03 1.3182712e-03 -5.4142345e-03
1.4117574e-03 4.9261809e-03 5.1548481e-03 9.1816373e-03
-7.5126649e-03 -5.4036439e-03 6.4693727e-03 1.3554788e-03
-6.6118012e-03 8.8438985e-04 2.6770402e-03 -2.5288356e-03
-4.9601602e-03 5.0047552e-03 9.6218213e-03 -7.3646735e-03
-1.1532188e-04 -2.5644589e-03 -6.3651418e-03 -1.3786554e-03
-5.2507855e-03 9.0599954e-03 -5.7907687e-03 3.6860751e-03]
phrases.: [-2.3748518e-04 4.2191767e-03 2.1141458e-03 9.9958219e-03
6.2948110e-04 -5.4644262e-03 -1.1796928e-03 2.0705319e-03
-3.3730685e-03 -7.8467671e-03 -5.5992617e-03 -6.7500677e-03
6.3533271e-03 3.9225565e-03 8.2155354e-03 6.5196683e-03
-6.1278404e-03 2.7159513e-03 8.4721260e-03 1.5956569e-03
3.0682290e-03 5.8126138e-03 -8.8393716e-03 9.1247475e-03
6.8194829e-03 8.5104434e-03 -8.2262624e-03 6.1755395e-03
6.6290712e-03 -1.3576425e-03 -6.2938654e-03 5.3266799e-03
-6.8595777e-03 -5.3233542e-03 3.5116898e-03 8.0809724e-03
8.6926939e-03 -4.4053150e-03 -9.1887703e-03 9.6076941e-03
6.2903082e-03 -3.9663352e-03 -8.4597291e-03 -4.7183349e-03
-3.9572273e-03 -3.2734512e-03 8.1909180e-04 -2.9716254e-04
-3.1123769e-03 -5.9959874e-03 9.4205197e-03 -4.7255373e-03
-7.2620986e-03 7.6847305e-03 2.5176955e-03 8.6263958e-03
-4.4651162e-03 -6.8924036e-03 9.8490238e-04 -1.1729765e-03
-9.3970643e-03 -1.6030729e-03 3.0505990e-03 6.5657818e-03
6.8452419e-03 3.2082784e-03 -4.4432725e-03 -1.8391669e-03
-3.9402582e-03 5.7739150e-03 -6.3587092e-03 2.1030188e-03
-1.3452339e-03 -5.8127786e-03 -7.2462116e-03 5.8525624e-03
-8.3582047e-03 -6.8724988e-04 2.8274262e-03 7.7390098e-03
-7.2979080e-03 3.3045732e-03 9.8084975e-03 -6.9770790e-03
-3.5348581e-03 5.1335134e-03 5.2383854e-03 1.6241145e-03
7.9711350e-03 8.3158852e-04 1.8713165e-03 -1.6052496e-03
-8.1662778e-03 3.2578039e-03 1.9663644e-03 -8.7342048e-03
-6.7500712e-04 7.6670643e-05 -5.9592726e-06 8.7101338e-03]
Machine: [-0.00250769 -0.00590214 0.00748359 -0.00725953 -0.00896705 -0.00179033
-0.00836642 0.0003906 0.00194712 -0.00247143 -0.00644694 -0.00032104
-0.0010995 0.00349279 0.00812582 0.00585578 0.00844245 -0.00896896
0.00944278 -0.002366 0.00869779 0.00238499 0.00358479 -0.00958111
-0.00948839 0.00898379 -0.00289741 0.00281667 0.00641986 -0.00029921
0.00972034 -0.00103381 -0.0096725 -0.00705586 -0.00104376 -0.00867503
0.00742212 0.00361992 -0.00874684 0.00848127 0.00893157 0.00584712
0.0069096 -0.00957053 0.00049234 -0.00922105 -0.00366677 0.00025273
-0.00027918 0.00146639 0.00327784 0.00212685 0.00532061 0.00752035
-0.00588611 0.00795842 0.00599318 0.00978658 0.0046235 -0.00332651
-0.00374691 -0.00062921 -0.00165593 0.00987186 0.00112398 0.00400811
0.00341825 -0.00885272 0.00672129 0.00818947 -0.00166584 0.00233221
-0.00647934 -0.00612656 0.00821669 -0.00304531 0.00674071 0.00155423
-0.00198131 0.00305538 -0.0040224 -0.00178375 0.00138151 0.00488665
-0.00140527 0.00065704 -0.00793116 0.00949664 -0.00876311 0.00706956
0.00390611 -0.00699837 -0.00529647 -0.00793716 -0.00513078 0.00706855
0.0096402 0.00215451 0.00063906 0.00952605]
studying: [-4.9744281e-03 -1.2819419e-03 3.2805696e-03 -6.4135678e-03
-9.7010247e-03 -9.2597147e-03 9.0216873e-03 5.3709764e-03
-4.7893440e-03 -8.3293207e-03 1.2939799e-03 2.8777621e-03
-1.2441194e-03 1.2696359e-03 -4.3201470e-03 4.7911401e-03
1.4752066e-03 8.8776844e-03 -9.9774236e-03 -5.2702967e-03
-9.1031492e-03 -3.4707010e-04 -7.8563625e-03 5.0302958e-03
-6.3969446e-03 -5.9527326e-03 5.0706035e-03 -8.1606284e-03
1.4553393e-03 -7.2396114e-03 9.8630870e-03 8.6331181e-03
1.7690858e-03 5.7891281e-03 4.5957770e-03 -5.9914123e-03
9.7564021e-03 -9.6809259e-03 8.0496687e-03 2.7556485e-03
-3.0548468e-03 -3.5617144e-03 9.0722963e-03 -5.4406989e-03
8.1870044e-03 -6.0093733e-03 8.3913896e-03 -5.5524305e-04
7.9422537e-03 -3.1555982e-03 5.9792972e-03 8.8043828e-03
2.5439742e-03 1.3168567e-03 5.0386842e-03 8.0022616e-03
8.5683195e-03 8.4928004e-03 7.0526903e-03 8.0017354e-03
8.5996957e-03 -3.3915818e-05 -1.0022400e-03 1.6660418e-03
2.4510909e-06 6.8559428e-04 -8.6009819e-03 -9.5939171e-03
-2.3162055e-03 8.9279553e-03 -3.6485353e-03 -6.9782822e-03
4.8802188e-03 1.0700381e-03 1.8501320e-03 3.6530525e-03
3.5203157e-03 5.7258354e-03 1.2332938e-03 8.4449851e-04
9.0453075e-03 2.7812589e-03 -4.7023315e-03 6.5423078e-03
5.2142367e-03 2.8703045e-03 -3.1375764e-03 3.3370985e-03
6.3645425e-03 7.0812847e-03 9.4101735e-04 -8.5313581e-03
2.5783107e-04 3.7016699e-04 3.9442056e-03 -9.4685135e-03
9.7085694e-03 -6.9715804e-03 5.7624700e-03 -9.4306935e-03]
performs: [ 0.009648 0.00732475 0.00126254 -0.00340383 -0.00045136 0.00042171
-0.00640851 0.00574553 0.00237036 0.00377734 -0.00725502 0.0085258
0.00050815 -0.00020326 -0.00907123 0.00404881 0.00676354 0.00735533
-0.00641774 -0.00785627 -0.00552331 -0.00060249 -0.00833713 -0.008241
-0.00191755 0.00113944 -0.00950773 -0.00373217 0.00064473 0.00680987
0.00173532 -0.00063258 -0.00748095 -0.00674214 -0.00069432 0.00746793
0.00544338 -0.00148258 0.00117257 -0.0096057 -0.00138389 -0.00462648
0.0058087 -0.00233826 -0.00476429 -0.0094753 -0.00120084 -0.00719734
-0.00168448 -0.00406995 -0.00237469 -0.00324882 -0.00815585 -0.00124795
0.00169132 -0.00404639 -0.00764095 -0.00358622 -0.00904624 -0.00075763
0.00588279 -0.00296112 0.00316147 0.00499545 0.00846852 0.00562166
0.00950845 -0.00964597 -0.00796274 -0.00675794 -0.00746796 -0.00796382
-0.00778757 -0.00294263 0.00139659 -0.00287486 -0.00881693 0.00498549
0.00090037 0.00458933 0.00719441 0.00764854 -0.00080405 0.00366071
-0.0051234 0.00191076 0.00453856 0.00988659 -0.00318734 0.00283978
-0.00573614 -0.00221107 0.00812437 -0.00390496 -0.00118825 -0.00928422
-0.00947652 0.00888241 -0.00570256 0.00505304]
important: [-6.9642225e-03 -2.4577791e-03 -8.0224415e-03 7.5020380e-03
6.1277132e-03 5.2576112e-03 8.3776927e-03 -6.9619616e-04
-9.3130041e-03 9.1158813e-03 -4.9281693e-03 7.8473389e-03
5.5337492e-03 -1.0779138e-03 -7.6639336e-03 -1.4594875e-03
6.2543871e-03 -6.9649266e-03 1.4419832e-03 -7.9515539e-03
8.7216776e-03 -2.8559160e-03 9.4372621e-03 -5.7094311e-03
-9.7170137e-03 -8.6279875e-03 -4.0757605e-03 4.7113253e-03
-2.4214860e-04 9.2232032e-03 3.1090893e-03 3.7477084e-03
2.9968580e-03 8.1492346e-03 -2.3968606e-03 7.4072666e-03
-9.5360866e-03 2.9208944e-03 -6.8134320e-04 4.5379676e-04
6.8433154e-03 -2.8419490e-03 -2.3573765e-03 -1.0035759e-04
-4.9797940e-04 -3.5739222e-03 6.2446906e-03 -6.5591708e-03
7.8920480e-03 -9.3652707e-05 2.6090299e-03 3.2230925e-03
-2.8171425e-04 1.7064606e-03 -3.1402293e-03 4.7570257e-03
2.4389484e-04 -3.2796264e-03 -8.7136151e-03 -9.9965446e-03
3.1161107e-04 -5.7468796e-03 -1.1109039e-03 -4.2065969e-03
-8.6383857e-03 1.0619357e-03 5.9117922e-03 -2.2112236e-03
-7.1700090e-03 3.1545502e-03 -3.8561464e-04 -5.5222521e-03
-1.1054390e-03 -6.3986052e-04 -3.1826457e-03 -9.9551752e-03
7.6383627e-03 3.7257639e-03 -2.5292572e-03 7.3063695e-03
4.5307400e-04 7.1741296e-03 -1.5471060e-03 7.4943686e-03
-4.2693278e-05 -6.0767685e-03 -4.7154981e-03 9.6269222e-03
5.8188086e-04 1.0276764e-03 8.4495144e-03 -6.2889913e-03
-1.7638321e-03 -8.1800381e-03 -6.6752918e-03 -8.5803727e-03
3.9315224e-03 2.7399913e-03 5.6152157e-03 2.5727616e-03]
position: [ 0.00211352 0.00573516 -0.00211641 0.0031723 0.00844376 0.00038807
0.00629458 -0.00674357 0.00657582 0.00468948 0.00508035 -0.00991878
-0.00042944 0.00320611 -0.00582599 -0.00669379 0.00636391 -0.00682375
-0.0051825 0.00812184 -0.0070203 0.00854537 0.00065462 0.00440571
-0.00301244 -0.00542773 -0.00894753 -0.00061247 -0.00510224 -0.00307603
0.00811145 -0.00764791 -0.00630928 -0.00526368 -0.00660374 -0.00884062
-0.00111004 0.00944598 0.00803654 -0.0052741 -0.00813751 -0.00225739
-0.00926678 -0.00506774 -0.00594781 0.00302512 -0.00756904 0.00125059
0.0022869 0.00531332 -0.0020204 -0.00977166 0.00522167 -0.00590649
0.00488576 0.00197475 0.00881742 0.00153134 -0.00182746 0.00648877
-0.00706992 -0.00838906 0.00378917 -0.00257695 -0.00418384 -0.00192488
-0.00987509 0.00026054 -0.00105665 -0.00297142 0.00250064 0.00469339
0.00634261 -0.00791375 -0.00498899 -0.00878747 -0.00894904 -0.00373006
-0.00127371 -0.00821263 -0.00537632 -0.00215177 0.00634269 0.00156861
0.00831469 -0.00831621 -0.00457587 -0.00080408 0.00880018 0.00110635
0.00153998 0.00129079 0.00292262 -0.00939595 0.0032544 0.00546469
0.00528633 0.00443989 -0.00808637 -0.00405978]
Pure: [ 8.3489111e-03 -5.7309150e-04 -9.4367787e-03 4.7836374e-03
-6.0451375e-03 6.6814935e-03 5.3737783e-03 -5.0456729e-03
2.5694286e-03 5.4166410e-03 -3.5853053e-03 -1.5160334e-03
9.1695711e-03 9.0632094e-03 -9.3929647e-03 7.5673093e-03
9.8880492e-03 -2.8401697e-03 2.4593461e-03 -2.8033508e-03
8.6454451e-03 -2.8328301e-04 5.6363083e-03 9.2128953e-03
4.1102469e-03 -7.1203900e-03 -1.9258297e-03 9.7802514e-04
2.0340765e-03 2.9542148e-03 9.4493590e-03 4.4011008e-03
9.9138999e-03 -8.6577032e-03 -5.7544159e-03 1.9863057e-03
3.6561727e-03 -9.9117996e-04 -6.9116484e-03 -3.2116629e-03
-8.5275723e-03 9.4107138e-03 3.7244356e-03 -7.8794183e-03
3.1869686e-03 4.1738357e-03 -5.6389845e-03 -5.9127915e-03
1.0383666e-03 8.9620445e-03 -9.6462807e-03 6.2906743e-06
-6.8649445e-03 -9.3224883e-04 3.0410015e-03 -5.0299671e-03
-2.7760041e-03 6.7558768e-04 -6.3622212e-03 7.2865784e-03
4.3784226e-03 -8.5585341e-03 -2.1489717e-03 3.1645298e-03
-8.3275940e-03 -7.0689130e-03 -8.4537407e-03 -5.4985918e-03
8.8560972e-03 7.0770490e-03 2.8857135e-03 -8.5545694e-03
5.7432330e-03 4.6334174e-03 1.1897683e-04 -8.8429376e-03
-1.8837297e-03 1.9086480e-04 -7.7579427e-03 2.4701594e-03
4.8376678e-04 -7.0600295e-03 -8.2694087e-03 6.0421908e-03
-8.3504906e-03 -5.5797850e-03 5.5801249e-03 -4.8635126e-04
-3.0543648e-03 -5.1943767e-03 -1.1979473e-03 5.2717174e-03
-5.9464397e-03 -4.9771736e-03 -4.9486230e-03 -4.7563482e-03
-7.9800924e-03 -9.7564645e-03 7.5821662e-03 7.9967510e-03]
For a extra complete and production-ready answer, think about using established NLP libraries comparable to spaCy, NLTK, gensim, or leveraging pre-trained fashions like BERT or GPT.
To visualise the phrase embeddings obtained from the earlier code utilizing Word2Vec, you’ll be able to create a scatter plot. Nonetheless, since phrase embeddings usually have greater than two dimensions, you’ll want to cut back the dimensionality for visualization functions. One widespread method is to make use of strategies like Principal Element Evaluation (PCA) to cut back the dimensionality to 2D or 3D for plotting.
Right here’s how one can create a scatter plot utilizing PCA to visualise the phrase embeddings:
import numpy as np
import matplotlib.pyplot as plt
from gensim.fashions import Word2Vec
from sklearn.decomposition import PCA
from sklearn.feature_extraction.textual content import CountVectorizer# Pattern sentences
sentences = [
"Natural language processing is a fascinating field.",
"NLP techniques enable machines to understand human language.",
"Word embeddings capture semantic relationships between words.",
"Machine learning plays a vital role in NLP.",
]
# Tokenize sentences
tokenized_sentences = [sentence.split() for sentence in sentences]
# Prepare Word2Vec mannequin
mannequin = Word2Vec(sentences=tokenized_sentences, vector_size=100, window=5, min_count=1, sg=0)
# Get phrase embeddings and phrases
word_embeddings = []
phrases = []
for phrase in mannequin.wv.key_to_index:
word_embeddings.append(mannequin.wv[word])
phrases.append(phrase)
# Apply PCA for dimensionality discount
pca = PCA(n_components=2)
reduced_embeddings = pca.fit_transform(word_embeddings)
# Plot the scatter plot
plt.determine(figsize=(10, 8))
plt.scatter(reduced_embeddings[:, 0], reduced_embeddings[:, 1], marker='o')
# Annotate the factors with phrase labels
for i, phrase in enumerate(phrases):
plt.annotate(phrase, (reduced_embeddings[i, 0], reduced_embeddings[i, 1]))
plt.xlabel('PCA Dimension 1')
plt.ylabel('PCA Dimension 2')
plt.title('Phrase Embeddings Visualization')
plt.grid()
plt.present()
On this code, we use PCA to cut back the dimensionality of the phrase embeddings to 2D for visualization. Then, we create a scatter plot and annotate every level with its corresponding phrase label. The ensuing plot ought to offer you a fundamental visualization of the phrase embeddings in a decreased area.
Please word that this visualization is an easy illustration and will not seize all of the nuances of the embeddings. For extra subtle visualizations, think about using libraries like t-SNE or UMAP, that are specialised for visualizing high-dimensional information.
Conclusion
The mechanism for understanding the connection between phrases within the realm of NLP is a charming journey into the intricacies of human language. From statistical language fashions and phrase embeddings to contextual understanding and syntactic evaluation, NLP mechanisms have opened the doorways to exceptional functions and transformations. As the sphere continues to evolve, the mechanisms to fathom the online of phrases will undoubtedly unravel extra profound insights into the tapestry of human expression.