Great one visual asset news to get top stories and crypto and bring them down to bite-sized pieces So today just as the thumbnail suggests I think this is a pretty big day for what exactly is going on because Stripe one of the biggest payment processors in the globe is not coming forward and saying hey, you know what? Let's get on to the crypto bandwagon So I'm gonna talk to you just about how big that potentially could be Stripe and accepting payments worldwide globally in 180 plus countries in like over a hundred different countries cryptocurrencies, I think it might be something also we're gonna take a look at ETH 2.0 stake not WTH Stakes, but Luna is really the will the real winner so far We take a look at total value locked and how much is actually being staked them We're gonna go just a little smorgasbord of crypto world moves We're gonna talk about Binance and how they're really just becoming a global dominator We'll take a look at India what they want to do as far as their CBDC plans Which I think kind of ridiculous and then lastly we'll take a look at Elron Yes, no wrong and then at the end of the show. We'll just do five quick questions in five minutes So hold your questions till the end and then we'll go from there So today's a little bit a little bit rush. I'm trying to put things together. Make sure everybody can hear me It looks good. Great fantastic Let's jump into first of all the market and also if you're you know here for the fly stream Thanks if you're watching the replay just know that there are timestamps underneath so you can skip ahead and forward All that good stuff also looking for great information.  It's 100% free. All right Let's jump into it for what it is and that's what someone so I want to show you but Just so you know, I've got a second microphone. So what I'm gonna start doing is actually some in-house Interviews so let me know who you'd like me to have Interviewed here. Hopefully they live in Puerto Rico and I'll make that happen. So without further ado the market I'm just gonna skim over this because guess what you look at your portfolio a thousand times a day This was from yesterday. So I don't know what it is. Let's refresh it and see what we're at 1.8 30 And hey 0.7% that's pretty good. I'll take a little bit of when I thought I was actually going down But yeah, all right bitcoins up everything's up a little bit. Maybe some some good news It's a funny thing in crypto because you know, we could have about a thousand Great pieces of news and then one person in one far off continent will say something goofy and I'll just go down It's a very fragile market. I think and there's a lot of manipulation and whales out there So just be careful and you know, really what it comes down to if you don't want to do 50 or 100x leverage plays There's other things to do not a vestment of ice, but my opinion is I'm not gonna go 100x leverage That's just me just being crazy, but polka dots the big winner today up 7% 4% Okay, that's what's going on. Who really cares? Let's jump in today's top story I could really care less about the market. So this is what we got today so this I found to be fascinating and I had heard about this like late last night. I didn't really pay much attention. I'm like a stripe whatever but then you know When PayPal came out and said we're gonna start we're gonna accept crypto and it was around that same time that Tesla guy And it was like a double effect and all of a sudden we just boom market took off now We've got a lot of macro factors going on. I don't think this is gonna be the impetus But I do think that this moving forward is huge and it's really comes down to the first couple of sentences of What is going on this article? Because I didn't really realize this. So this will happen Stripe the company announced a suite of products today aiming to give customers access to tools and APIs that make it easier for customers to buy and Store crypto tokens cash out trade NFTs and handle compliance workflows like KYC or no your customer Stripe supports page notes of the company's products will enable support for customers to buy that more than a hundred and thirty five Plus cryptos with fiat in 180 countries, I don't need to say that again.  This was a good article by Brian Dean Cover 14 21. It's not too long ago. So we take a look at the key stripe statistics Stripe is valued at 94 billion dollars. Sure great, but currently it has 3.1 million Active websites use stripe 3.1 I have all my websites use stripe because we you integrate them on the back end They're the one that process all the payments all the mass cards of visa and blah blah and they are kind of like another layer solution So when we have stripe coming out and said hey, we're going to accept Crypto payments globally. This is a bigger deal Then I don't know if people realize just how big this could potentially be so moving on Where is stripe available worldwide stripes available and in business in 46 countries and now we know it's much more Since 2009 stripes expanded to 20 new ones and then this part down here Where to go? Nah, not that one. That's the boring Stripe processing volume growth. So you can see how much has grown in a good five years It went from 10 billion double the 20 billion 50 billion 100 billion 150 billion 350 billion dollars That's a lot of processing power and then if we come back here, not only do they have a lot of processing power and a lot of pull in all these different websites, but also there's a little exchange called FTX Along the news crypto exchange FTX announced that will be partnering with Stripe To improve its identity compliance features and fiat onboarding workflow for users and I was thinking myself Is this real? I mean, is this like really happening? So if you take a look at the stripe website And just go to crypto I linked that in the description if you want to take a look or you can Google it stripe stripe crypto here. It is And you can start doing everything right now. So build your crypto business with Stripe They have been out man. I've even got FTX blockchain and just mining interesting Crypto exchange and on ramps seem like everybody's getting to that wallets. They even got an NFT marketplace That could be something. I don't know some people say that empty is gonna be pretty big So we'll get for business trusted solution except Fiat globally payout effortlessly Identity users company alley lower fraud move carbon effortless Well, look at that And then you just fill this out and they'll have a representative talk to you so this Is pretty darn big and I think it's one of those those instances where It's great news People are gonna hear about it and what they're gonna do is they're gonna say let me take a look at the actual prices Okay, I went up point seven or seven who cares if you look at the big picture about what's going on That is an enormous turnaround for a huge company like that to go Well, you know, we started 2014 2018 didn't really see much traction Now we're gonna get back into it because I think we see where things are going And yeah, let me what you think about that in the comment section I like where things are headed now. Let's turn to everybody's Second favorite topic Ethereum 2.0. So ETH Now has this consensus layer not either 2.0. It's a bit different But this what's going on ETH Ethereum's consensus layer contract hits 10 million state The migration the proof of state consensus appears be progressing. Well, how is we how are we looking at that? Well? 10 million ether staked into the ETH to consensus layer Deposit contract since inception November 4th last year. This figures equivalent to 26 billion. That's pretty good ETH one is now being referred to as the execution layer and the upcoming proof of state blockchain ETH 2 Not a 2.0 now known as the consensus layer. There's some more stuff down here, but not really that interesting Really, which want to do is look at this. There's a website It's called stakingrewards.com and it ranks all the top cryptos and you can you can distinguish this by Market cap you can distinguish it by the total staked But what I want to do is take a look at the staked value of how much is actually You know the money that is rolling in and Tara is number one not by much But it is number one the staked value is 32 billion dollars market cap 37 Billion dollars that's pretty good and then the rewards are 6 percent total stake is 41 percent. However, Solana Even though doesn't have them as much staked value. Look at the total stake for Solana almost 75 percent 75 percent. That's huge ETH 2.0 is only a roughly 8 percent. But look at that staked value 25 billion Cardano 18 billion has been slipping I remember when it was a not in the mid 70s as well Now it's not a 68 percent avalanche is at 50 percent. I will tell you this avalanche would have a heck of a lot more Stakers if Voyager would allow them to take it off of their platform Not complaining But just complaining. Let's see finance chain 81 percent. That's totally central. I nobody cares about that 63% cosmos hub. I will tell you this I own cosmos That's how my friend Jerry Hall a couple days ago If you're looking for some ridiculous yield, which is super dangerous Look at cosmos and all their ecosystem. That's all I'll say to that. You can do your own research But it's pretty insane and he's making crazy money. So that's we have as far as ETH 2.0 staked, but again, I think Luna is the real winner so far. We'll see it all plays out and let's finish this up with The crypto world moves again We can look at news any way we want to right we can take a look at and say well, you know what? This isn't so good or that's great or this is blah blah blah, but in all honesty There's a lot of good news going on in the world and it's all what we want to focus on But does that necessarily mean that it's gonna lead to price appreciation? No Usually a secondary thing, but this I found interesting finance and veils plans for world domination By buying up companies in every single sector. So here's what we got. This was from CZ says we want to identify and CZ CZ thing is the CEO of Binance can't can't escape that guy We want to identify and invest in one or two targets in every economic sector and try to bring them into crypto Said CZ this announcement comes not long after Binance monumental 200 million investments In Forbes in early February and I think it became like the second or third largest stakeholder In Forbes, which is a pretty legacy institution as far as for journalism And I know people will look at that and go why they do that. Well He who controls the narrative Can control the world and I thought it was a very smart way to get into well news Integrate yourself into all things happening As far as what is the information that's being put out there and you'll notice Forbes crypto seems to do a lot more stuff. I'm just saying so that's a pretty good play But this time I did not know Binance grew to an estimated valuation of approximately 300 billion And established CZ ping as the 11th wealthiest man in the world. Let me see that again because I did not know that I don't know if you knew CZ ping the 11th wealthiest man in the world Is the CEO of Binance? Let that sink in for a second. So when you have all the charlie mongers And all the warm buffets and they're saying that it's just awful stuff and and these billionaires like we don't understand because it's It's gonna be the worst thing of all time. Well, guess what?  You missed out on amazon.  It's okay. It's all right. You're gonna be wrong And the people that are wrong the legacy investors Not to take any away from what's what he's done before but you're gonna get passed up And is that like really the the end i'll be all no But it just goes to show you that you know The experts can only tell you what was they cannot tell you what will be and here we have CEO Of a crypto exchange as going to be probably in the top 10 in no time flat So to finish this up While crypto exchanges have previously plastered logos on stadiums and stolen the show of the super bowl Binance acquired things like coin market cap forbs car payment services such as swipe and a bunch of other ones And then just a bunch of other things down here that they talk about a little bit of controversy, but nothing too big So the thing is like this If you look at companies that have uh have grown massively what they do they acquired other companies Take a look at facebook facebook would be irrelevant right now If it wasn't for the fact that it bought up instagram And whatsapp and all the other different social media platforms to stay relevant up to this point amazon wouldn't have done anything If it wouldn't have acquired all those different warehouses and zappos and all different bookstores and things like that Because they just gobble up everything and now you see the same thing with finance they're going to be the big leaders in crypto And at some point it won't be finance And global and finance us it'll just be finance. So let me know anything about that in the comment section Let's finish up with two pieces here.  This is the thing india finance minister, uh, nirmala sitharaman So that she expected the nation's central bank to launch a cbdc or digital rupee this year Varying from her early statement that it would launch sometime between 2022 and 2023 I just found it interesting that everybody's trying to get to this the cbdc the central bank digital currency You got a digital ruple. You got a digital you on now. You'll have the digital rupee pretty soon this year Here's the question I have for everybody um Our other country's gonna use this I mean in all and I know it's like you're like, well, of course they would but really like Do you think that that america really wants to use the digital you on? And do you think that china or do you think that uh, the uk really wants to use the digital rubble? I just I just don't see how it's gonna work out and then even like us Like do you think china wants to use the digital dollar for a cbdc? There is no way. I think there has to be some type of Massive stablecoin that they can kind of get into and out And that's the only way this is gonna work. I I just don't see it now the the population in general will probably go Yeah, sure. I'll use cbdc because I don't understand how this works And of course, you know, when they get a shutdown, that's that's what it goes down to But I think it all comes out of stablecoins and I think that's why gary genzler is harping on him so much And of course, janet yang which leads me to my last point el ron yeah el ron I don't Here's I don't own a el ron, which is why I don't really talk about el ron too much But after this article, maybe I should so El ron network acquires payments from twist pay When's an e-money license? Why is this important? I think it's hugely important. Check this out El ron network has an approval to issue electronic money by the country's central bank the national bank of romania El ron which recently acquired payments gateway. You trust did not disclose the financial details of the acquisition However, cio minkou said this shows that central banks may be switching from a counterpoint To the crypto space to what I mean more neutral or even potentially favorable point electric money or e-money Is defined as an electric store of monetary value used for making payments to entities other than the e-money issuer And this is where it gets good under european union passport rules The license will allow el ron to operate e-money services across eu iceland lichtenstein and norway And the eu commission's proposed markets and crypto assets regulation or mica stipulates that license e-money institutions will be entitled to issue stablecoins And minkou finally said we've been having focused conversations with the romainian central bank about acquiring an e-money license institution That enables us to create stablecoins in a legal And compliant way. So this is just a message for The sec and the cftc and everybody else that's uh going under the uh, biden administration and the executive order Do this Don't just have people come in and just go thanks coinbase for coming in so we can see the pants off you Have them come in and really talk about like how we can can stay competitive globally before everything passes us by And I think that's really what it comes down to I know people are scared of regulation, but i'm telling you My opinion Out of vice I do think we need a little more regulation Just to get to the point where we know the rules so we don't keep getting sued over and over again And we can work around those rules. Just give me the factor and we'll move from there. That's how I see it Anyhow, that's all I got So let me know what you think about that in the comment section, but that concludes The news part if you want to stick around we'll do a little q and a little five q and a 20 questions in five minutes 20 questions five questions in five minutes and then we'll go from there and before you take off just know that uh, No, that's chewy. Uh, we're going to do the dca show tonight That's at 4 p.m. My time in portorico 3 p.m. Eastern And noon pacific time. So that's in uh 10 11 12 Six hours from now It's me been from into the cryptoverse and jay invest answers and we'll be talking about. Oh, I know what we're talking about probably something Probably Probably where this mark is going. How about that? So we'll do that later on I'll send it out on a tweet. So follow me on twitter and you can get the information quickly And that's it. So thanks for stopping by. Let's do some questions q and a All right right Crypto with and rich. Thanks again. Thank you for showing up. I appreciate it Uh, roberti take uk's actions to ban bitcoin atms Depends on the atm. I got to see what's What it is with that. I I did see some pretty crazy things. There's just things called payday loans here in the united states I don't know if you have them, but if you miss those loan payments It's like 99 or something crazy 130 interest and it's pretty predatory loaning Uh, so I don't know if they're like the atms are like super crazy fees. I know like Pretty damn high, but it does give access to people with bitcoin to get bitcoin, but the fees are ridiculous Um in some places not all of them. So I have to take a look at the whole thing and I'll get back to you when I know More information the question number one James would probably get a conversation to a salana conversation to induce it Maybe I mean look james likes james likes salana. I like salana and and uh, cardano So I don't know the point. I also like bitcoin and gold I don't see the problem Uh This is a great question. What's a good chill place to eat in portorico? If you want some great views this place called sand and sea it's up in the mountains and it's awesome. You can see everything Um, those are the best places. Those are the non-touristy places for harville in the jungles, but uh It's kind of hidden So that's probably the best place or if you want to go on the beach Just go to the the trist and overlook the waves and that's pretty chill Uh But who is charles bronson? I said, uh, charles bronson's richard bronson. It's pretty funny Um, let's see question number two rob speaking of cardano. Have you dabbled in cardano? I have teas yet. Yes I've got cardano combat and some other ones What if I told you one of them gives you passivata? Guess what it's around.  That's pretty funny. I guess it's not that's just a point that Let's see what this is The whole iran team is from the city of shiba in romania president romania is also from sh. Oh, sorry shiba city thoughts everyone was born When lones became president strange. No, I think it really all comes down to all businesses is just connections That's really what it comes down to so if you have good connections, you'll That's how businesses work Who do you know who can you get attached to and stuff like that? That's it Why does peter shift? I don't know that guy Constantly bash bitcoin went on his website and you go the accepts it as payment method Well, I don't know who that guy is but he sounds super irrelevant. But if if I had to guess uh, it's because he's probably one of those guys who talks about Uh, how the world's going to collapse and only gold will save you even though he probably only invests five percent of his net worth into said gold and puts into other stuff like gold miners Which you know, they sell a bunch of gold those gold miners and uh stocks and whatever else it gets into so I don't know. Uh, probably to keep himself a little relevant. Again, I don't know that guy Questions still buying algo. No, not I got a concern with their I bought a bunch of it was delicose having you for quite some time and I stopped about a week ago or so I've got some concerns about those tokenomics And if you want to watch a great video about that go watch guy over on coin bureau. Uh, this is a great question How can we get family members started in crypto? First of all, don't bombard them with information because they'll just tune you out. That's the first thing. Uh, the second thing is tell them Everybody's different like some people are libertarians.  If they're really big into Technology and and how it can save money Talk to them about the cross-border payments and how fast it could be as opposed to swift Really, it's if you're gonna It's all basics marketing, right? You just talk to people where they're Their pain or pleasure points are and go from there. That's it. And I think There's a Oh, here's a great question Question number four. I think how is life in the caribbean? Well, great. Puerto Rico is great I didn't like it too much at first when I first got here, but there's a lot of things that make it awesome Uh, and I did a video on it and it's over at danteachescrypto.com. You can check it out in chapter three Three and just scroll all the way down. You'll find it But I will be also so if you have access to it, you can get it to it right now It's a long one But there's so many things that I screwed up on that I had to tell you all the things that I would do differently and uh, what you could all do alternatively and then also Due to high demand people are like, well, I don't want to sign up for your website even though it's free And I don't want to give you my email. It's fine. I don't care So I'll also be releasing it on saturday morning On youtube so That'll give everybody options, right? No, not everybody wants to be on my website. I can just I get it. It's okay And what I miss Robert says good question Can you transfer funds from a non crypto ira to roth ira at itrust capital? So when I open it up, I didn't have an ira But I know other people have done it But there's a way to do it So the best way to do is as you may know I'm always this thing up here this open a crypto ira for iTrust You know, there's a link in the description I also put them every single at the top of the comments click on that sign up for a 30 minute free Session consultation and talk to a live person I did that twice because I didn't understand what the hell it was Or how it worked and that's because i'm dense So like when you do that it kind of helps you to figure out like oh, this is for me or this isn't for me So do that first before you do anything And this is a good one Questions rob a nice introduction video from you I want anyone for people asking about crypto, you know Go to like on dante just crypto.com. There's this This is chapter one basics. I think it's like the first or second video. I talk about this is You know how I say Uh what crypto is or what bitcoin is and I go from there so I'll show you Wow, just let me just show you Ah, good bad board apes Whoops I'm gonna go there So yeah, just click here start learning and you sudden putting your email and I send you a Ah patrick b from cobec welcome Let's see You can do this. This is all I called the elevator pitch Just say this Bitcoin's digital gold It's scarce and it's market insurance, but unlike all you can send it to anyone within minutes Best performing asset class ever better than gold oil or any stock ever Used to be worth a nickel now. It's worth 10k. So, you know, how long I how long go I said that So it kind of hits everything, right? It scares it's really easy to move the money aspects. I guess I really get the uh The uh libertarian part, but now say something like that and get them rolling And the last thing I will say like this is let them do their own research because They have to it has to be in their head and has to be their idea You can plant the seed but you can't beat it into them because they're like, no And that's all I got Don't confuse robber facts one more. That's true Yeah Yeah, so charles bronson I think was an actor Richard Branson and believe is the virgin capital ceo and then charles manson is a mass murderer Okay, so I think we're all good there. All right. That's it guys. It's been 27 almost 30 minutes But that's all we got. So again, we'll do the dca show tonight and I'll see you guys over there Let me get james and uh and ben in here and that's all so if you like this video give it a thumbs up I appreciate it. Also, if you liked everything we talked about consider subscribing a lot of things do are time sensitive And we do these every single day. So that's all for today. Thanks so much for stopping by. I appreciate it And we'll see you on the next one obvious


Social network analysis is one of the major paradigms within contemporary sociology and it's also employed in many other social sciences. It offers us a powerful formal language with which to model and analyse the structure of social relations and how this structure of connectivity defines the overall social system. The big idea here is that of connectivity. A central axiom of the social network approach is that social phenomena should be primarily investigated through the properties of the relations between and within the units instead of the properties of these units themselves. As such, social network analysis is an alternative way of investigating complex social systems, one that is not focused on the actors and their properties, but instead on how they are interconnected and this is a paradigm shift, a very different way of seeing the world. In our traditional paradigm, we see things. We don't really see the connections, because connections are much more abstract. We can typically touch and hold things, but not connections. Connections are also typically much more complex. For every one thing, we can have possibly an infinite amount of connections and thus networks very quickly take us into the world of complexity. In order to understand this way of seeing the world, we need to first appreciate the connectivity creates a new kind of space. We're very much used to a linear conception of space, what is called Euclidean space. It is the space that we walk around in every day, and we see all these people and things that have certain properties to them, but now imagine you pull out your mobile phone and it's almost as easy to call a person just next door as it is to call someone on the other side of the planet. This connectivity creates a new kind of space, where our traditional linear conception of space is being stretched and distorted by this connectivity. Connectivity then creates a non-linear type of space, and that space is better called a topology. Topology is a branch of mathematics that can be used to abstract the inherent connectivity of objects while ignoring their detailed form. In its most general definition, topology means the way in which constituent parts are interrelated or arranged. Thus for any set of things or people, we can have a different set of global rules for how they are interrelated or connected, and this is a topology. So why should we care about any of this? Because as we noted, networks are all about connectivity, and connectivity is an exchange along which something will flow. Along every connection, there is a flow of something. In a communications network, information flows. In a financial network, assets flow. In a political network, power flows. If there is no flow, there is no network. So to understand any given network, we're going to have to understand how something flows through that particular topology. The topology is the environment, and the flow is the connectivity within that environment. As we are analysing social systems here, this environment may be a physical one where we are talking about basic demographics, the movement of people, migration, the spreading of viruses, urban transportation etc. All of these are social connections that take place within a physical environment. But also we can have an economic environment, giving us networks of financial and economic connections. We can also have a political environment through which power flows, a cultural environment through which beliefs, values and ideologies flow. All of these are very different topologies with different forces acting on them. In order to understand these networks, we need to understand these forces that are acting within that environment and shaping the formation of the network. There are really two different ways to start analysing a network, by either taking a bottom-up perspective where we're talking about the agents, why and how they make connections, or a more global perspective where we're looking at the overall network and the environmental context to see how this shapes the system of connections. Within any social network, we have some agent that is choosing to make that connection. Agents typically make connections based upon some assessment of the return on their investment of time, energy, interest, social capital or some other resource that they value. We make friends with people whose company we like. We believe in ideologies that we value. We watch television channels that we find engaging. These are all connections that we make because we value what we get more than what we have to give in making the connection. But there is also the context or environment within which an agent is acting and that environment is exerting some force resisting or enabling them to make that connection. As an example, we might think about an oppressive political regime that uses intimidation, coercion and propaganda to prevent people from forming counter-political movements. This is a form of resistance. The agents have to overcome their fear in order to make political connections within this environment. So we can understand this environmental context as a form of transaction cost, a cost that is being placed on an agent for them to make a connection. Inversely, it might not be a cost but a payment where the environment is conducive to them making that connection. We might think about an ecosystem as an analogy where when we turn down the temperature, all the creatures hibernate and when we turn it up, they come out and interact. The cost of making a connection is typically not evenly distributed out. Some options will be easier or more difficult than others. This is like water running through some rocks where it searches for the course of least resistance. So these are very general considerations but they will help us in contextualizing and understanding the nature of the whole network, the kind of forces that it's under. Contextual network science is quite an analytical approach and networks are quite abstract representations. This makes them powerful tools but it's also important not to do sight of the fact that these networks exist within some context and for us to understand the general nature of that context or else we can get blinded by the tools. Because networks are all about connectivity and the processes taking place through those connections, a central and overarching question will be that of network integration. One of the most important factors with respect to the nature of any society is the question of social cohesion or structural cohesion where we're really asking about the degree of integration to the overall system as this correlates to such things as social solidarity, shared norms, identity, collective behavior etc. The idea of social capital is often used as a metric to a society's degree of cohesion. Social capital may be defined as the network of relationships among people who live and work in a particular society enabling that society to function effectively. So from this perspective when we ask what is the difference between a socially functional urban community and a socially dysfunctional ghetto, we would say that there is some integration within the first that enables the flow of economic resources and social capital. While we would say that the second represents a disintegrated network that inhibits the flow of these resources disconnecting it from the broader social system and rendering it dysfunctional. Put very simply of central interest here is how something flows through the whole social network as it is this flow that gives it cohesion. This is obviously a very big and fundamental question when analyzing any social system. How integrated the whole system will be is determined by many different factors. A primary consideration is the density of connections within the whole system. Clearly the more connected it is the more integrated it will be going from a system with a low level of connectivity to one with a high level represents a very different overall dynamic. At a low level of connectivity we're really just dealing with a group of people. At a high level we actually have a network system. This fundamentally changes the dynamic and we'll be discussing this in a future module. A second key consideration affecting the overall integration to the social network is its degree of clustering. Clustering is one of the few universal features found in almost all social networks from the social networks of ancient hunter-gatherer tribes in Africa to today's global networks. Clustering is derived from the fact that people form connections to people with similar attributes themselves. What is called homophily and out of this we get global patterns consisting of local communities that have their own distinct structure. These clusters give social networks a distinct heterogeneity to their topology that makes them somewhat resistant to the uniform spreading of some phenomena. Another widely encountered phenomena within social networks is that of short path length meaning that although a social network may be quite large in terms of its number of members and despite the fact that they contain significant clustering we often find that in these social networks any member is connected to any other by just a few links and this is where we get the famous six degrees of separation hypotheses from. This average path length is again a key metric with respect to the overall integration of the social network. We're all aware of how social solidarity can break down as we scale the community up. The traditional mechanisms for social solidarity that work for thousands of years as we lived in small rural communities breaks down in large urban centers and this disintegration of social solidarity is still one of the great challenges that the modern era has presented. This metric of average path length is very important to social cohesion as it is a primary factor in determining how close everyone will think they are to each other and the overall degree of interdependence and cohesion to the whole system. Finally the last almost universal feature to social networks is a very high degree of inequality between how connected people are within the network. Here we're talking about degree distribution. A high degree distribution means some people have lots of links while others have very few and we often see that this inequality and connectivity is quite extreme. In fact it often follows a power law distribution meaning that there will be some who have a very high level of connectivity such as some celebrity might have. Again there is a positive feedback loop driving this that we'll be discussing in a future module but this degree distribution parameter is again another important determinant to the level of social integration. A low degree distribution gives us a somewhat egalitarian society with the topology having a certain evenness to it through which the same phenomena can flow to all members of the network and this is in contrast to the many socio-cultural systems we see that are in fact highly centralized with significant degrees of inequality and connectivity that creates some resistance to a uniform spreading. In this module we've been taking a very high-level view to social network analysis. We've talked about how connectivity creates a certain kind of space or what we call the topology that stretches and distorts our traditional conception of linear space. We discussed how reasoning about the general forces that are acting on a network can help us in providing some overall context to our analysis where we need to consider both the rules under which the agents are making the connections and the environmental context that affects those choices either enabling them or constraining them. We then went on to talk about some of the primary considerations to a social network's overall makeup and social cohesion. We touched upon the topic of network density as a primary factor. We talked about clustering that creates local communities and a heterogeneous topology. We cited average path length as another key factor to the system's overall cohesion and lastly mentioned degree distribution as a metric for the degree of equality within the system.


Hi everyone. Welcome to my talk using Apache OpenNLP with OpenSearch KNN Vector Search at the Linux Foundation Open Source Summit North America 2023. I wish I could be there in person to present this, but I am thrilled to be able to share it with you virtually. My name is Jeff Simrick. I am a Cloud Big Data NLP consultant. I am the current chair of the Apache OpenNLP project. You can get in touch with me in a variety of ways. The easiest way is probably through LinkedIn. So if you have any questions or would like to discuss anything that you see here or anything about OpenNLP in general, please feel free to reach out to me. I will be happy to help. Apache OpenNLP is a Java library for doing a lot of common natural language processing tasks. On the left side are some of OpenNLP's capabilities like tokenization, document classification, named entity recognition and language detection. It's a lightweight library. It does not have any dependencies and it does not require a GPU to train and use models. OpenNLP was first made available on SourceForge a little over 20 years ago in 2002. In 2010, OpenNLP joined the Apache Software Foundation incubator. In 2017, 18, 19, there was a lot of NLP fun stuff that happened. And then in 2022, OpenNLP 2.0 was released with support for using the Onyx Runtime to make use of some of the newer types of NLP models. So OpenNLP has a lengthy history, but it is a solid and trusted NLP framework that's being brought into some of the newer NLP technologies. Sentence Transformers is a Python framework for state-of-the-art sentence text and image embedding. So for this talk, we want to get vectors of sentences and ultimately search those sentences. And so one way that we can do that is through Sentence Transformers. Sentence Transformers, there's more information about it available at sbert.net or the paper that describes it with the link there. There are pre-trained models available on the Hugging Face Hub, so you don't have to train your own. You can just get started with one of the pre-trained models that are already available out there. And so with Sentence Transformers, we can take an input sentence such as I ate a hamburger and generate a vector for that sentence. And so with those vectors, we can do a lot of neat things, one of which is find similar sentences through search that we'll walk through in this presentation. So cosine similarity is a measure of similarity between two vectors. And if we can represent text as vectors, then we can use cosine similarity to find similar text. So in an example here, I am hungry as one sentence, and his name is John as two sentences. Cosine similarity allows us to measure the distance, the similarity between those two sentences. And we can then use open search as K and then plug in as a way to facilitate this. So we have Sentence Transformers, which lives in the Python ecosystem. And we have Apache OpenNLP, which is a Java library for NLP. So how do we use the Sentence Transformers in Python with the PyTorch and the TensorFlow models? How do we use that from Java from OpenNLP? One way to do that is using Onyx and Onyx Runtime. So we can take the pre-trained Sentence Transformers model, and we can export the model to Onyx, and then use Onyx Runtime to be able to call that model from Java. So Onyx is a model format that allows models to be used between frameworks and with some optimizations. So in the image here, you can take a model created in one deep learning framework, export it to Onyx, and then use it from another framework. So in this example here, we're taking the pre-trained Sentence Transformers models, exporting them to Onyx, and then using them from Apache OpenNLP in Java. And exporting a model into Onyx Sentence Transformer model is pretty simple. With the Python code here, it's just a couple lines. Model underscore name is the name of the model, as it is shown in the hugging face hub. And then we can just save from pre-trained, the model name from Transformers equals true, and we can call dot save pre-trained and give it a local path on our file system. So when this runs, it will get this model from the hugging face hub, export it to Onyx, and save it on our local file system in this directory that is in the Onyx path. So we'll have our Onyx model that we can then take a look at using. So once we have our model exported to Onyx, the question is, how do we call it from Java? We know we're going to use Onyx Runtime, but what are the inputs? What are the outputs to this model? How do we make use of it? There's a really useful app called Netron. It's available at netron.app. And with it, you can open the exported Onyx model and visually see what are the inputs and outputs for this model. So looking at a Sentence Transformer model that was exported to Onyx, we can see it has three types of inputs. It has input IDs, attention mask, and token type IDs. So over here on the right in the visual, we can see those. We can see the input IDs. We can see the token type IDs. Attention mask is there. The image is just too big and drawing a red arrow didn't quite fit on the screen. But those three are our inputs to the model. And then we have our outputs. We have an output down here. It's a three-dimensional ray of floats with length 384. And 384 is the size of the vectors generated for us by Sentence Transformers. So with this information, we know that we have three inputs, the input IDs, attention mask, token type IDs. We know the data types for each. Each of those are integers. And we know the outputs. We know that it's a float of three-dimensional array size. So with that information, we can take that into our Java app and use Onyx Runtime to use this model. So let's take a little closer look at what are the values of these inputs. So for the input IDs, they're integers that we saw. And so these, each value in this array is an integer that corresponds to a token in the input. So we get the input, we tokenize it. And then for each token, we look at the model's vocabulary file to determine the ID for each token. And each time we do that, we just put the ID in the array. So we are essentially just converting the tokens to integers based on the vocabulary file. The attention mask, one-hot encoding for the tokens we want to consider. Since we are creating a vector for sentences, we want to consider every token in the sentence. In some cases, you may not. You'll put zero in that part of the array for where you don't want to consider the tokens or for a different NLP task, there may be tokens that you don't want to consider. But for this example, we want to consider all. So we are using each one. Token type IDs denotes where one sequence ends and another starts. And so since we are only doing one sentence in this example, we only have one sequence. So each value in this array is one. There may be times in other NLP tasks, or even here, if we have multiple sentences, multiple sequences, we can use this to denote where one sentence or sequence starts and where another one begins. The outputs from the model that we saw, a 384 length array, this is our sentence vector. This is what we are after. We know we saw from NETRON that they are floats. And so each value in this 384 dimension array will have a float value. And that is our sentence vector. And so now that we know what these inputs are, how do we call them using Java, using Onyx runtime? So it's not very complicated. We have a map of string Onyx tensor, our inputs. And so this is our map of inputs. So we'll have three, the input IDs, the attention mask, and the token type IDs. For each of those, we'll create a tensor and put values in it. For the input IDs, we just get the IDs for each token. So we will have tokenized the text and use the vocab file to get those IDs. For attention mask and token type, we saw that those values are all just one. So these are easy. We just put one for each value of the array for each of these. For the outputs, we know we're expecting back a three-dimensional array, and we call it V, float. So we say session.run, pass at the inputs. And we know that that's the output. And so our sentence, our vector, what we're after is this V. The link at the bottom is a link to the open NLP source, where you can see how this is implemented and all of the supporting code that goes with it. But these lines here are the most important part. So now that we have generated our vectors for sentences, we know how to generate the vectors for our sentences. We want to be able to search. We want to be able to take these vectors, and we want to be able to find similar sentences, similar documents for each one. And so one way that we can do that is using OpenSearch. From OpenSearch's webpage, it's described as a scalable, flexible, and extensible open-source software suite for search. And so OpenSearch combines traditional BM25 search, but it also has capabilities for vector search through its KNN plug-in. So let's take a look at using that. All the source code and commands from here on out are included in the repository for this presentation on GitHub. Please take a look at that repository. All of the code and the steps are in there. So the commands that I'll walk through here, you can clone that repository and walk through those same commands. If you have any issues or questions about it, please don't hesitate to reach out to me. So to start, there is a Docker Compose file in that repository. Now if we run Docker Compose up, it will stand up OpenSearch for us on our local computer. Once that is finished, we can now create an index in OpenSearch. So using the command here, we are going to create an index called vectors. And we are going to create our vector field. So in the mappings, the properties, we're creating a field called ma underscore vector. And we tell OpenSearch that its type is KNN underscore vector with dimension 384. So this is the field in which we will index our vectors into for this index. So now we have our index and we have our vector field. Now we need to generate our vectors. So in that repository is a small Java app that includes the code I showed earlier for using generating the vectors. So we just need to build that and run it. So cd into that directory, run the maven, install for it to build it. And when you're finished, you'll just have a jar file that you can run. So if you run Java jar and the jar you just built and you give it the path to the Onyx model, it will load that model, generate the vectors for the sentences that are included in that small app and then write them to a file called vectors. If you take a look at the source code for that app, there are three sentences in there. George Washington was president, Abraham Lincoln was president, John likes ice cream. And so those are the three sentences for which we will be generating vectors when you run that command just above. You'll note that two of these sentences are very similar. That was done on purpose just for illustration so that when we search we can see that two sentences come back with scores more similar than the third. So now that we have run that, we have a file called vectors where our vectors are in it, we can now index those vectors into open search. And that is done using the command here. So we are going to make a post command to our vectors index to underscore bulk. And we are going to pass it the vectors file. And so what does this vectors file that we made look like? It looks a little bit like this. This is a shortened version to give you an idea. So on the first line, we say that we want to index into the vectors index of the document ID one and the field minus score vector contains the vector for that sentence. So this file contains each of those three vectors in each three documents. So doc ID one, a vector, doc ID two, a vector, doc ID three, a vector, all going into the my vector field. So now that we have our vectors index, we can do a search. So given some sentence, we can look at what are the most similar sentences that we have in this index for this given sentence. And we can do that using this command here. So we are making a get request to the vectors index underscore search. And here is our query. We are doing a K and N query. And we are say we're going to use the mount underscore vector field, the field that we set up the index. And here's our vector. So this vector is for a sentence. It can be any sentence. We could use that Java app which calls open NLP to generate a vector for any other sentence that we want to search for to find similar sentences to it. So when this command is run, it will reach out to open search, do the search and return back the IDs of the documents that are similar. And so here's the search results. We get back three hits, which was expected because we only indexed three documents into it. And so we can see that for each document, we get a score. For document one, we get a score of one. Document two has a score of 0.5. And document three has a score of 0.41. And so the reason this first document has a score of one is because the vector that I used in the search was identical to one of these sentences that we created vectors for. So that's expected. The vector that I searched for was an identical match to one of the vectors that we indexed. The second document has a score of 0.75. So you can see which two sentences here are which. And then the third sentence is 0.41. So we have our two sentences about being president and the third sentence about being ice cream. And so we can see how the first two sentences are more similar to each other than the third sentence. So to recap what we did, we saw Apache Open NLP is a Java machine learning language for natural language processing. It includes capabilities for a lot of common NLP tasks. And then the past year or so, it's been updated to be able to use some of the newer transformer architecture models via Onyx Runtime. So being able to convert those models to Onyx and then using from Open NLP. If you're a Java developer and you live in the Java ecosystem, you may have in the past used microservices for doing NLP tasks because it's hard to go across Java and NLP. But this is one method in which you can just call those models directly from your Java code. Open NLP also supports named entity recognition and document classification via Onyx Runtime. So those types of models can also be acquired from the Hugging Face Hub exported to Onyx and used from Open NLP in a similar fashion to what we saw here. We then used Open NLP to generate sentence vectors and we indexed those vectors into Open Search. Finally, we did a search to find nearest documents given a vector. So again, thank you. I hope this presentation is helpful and informative. If you have any questions, please feel free to reach out to me, connect with me on LinkedIn, send me a message. I'll be happy to help. If you have an interest in NLP, if this is exciting to you, we would love to have your contributions to the Open NLP project. Whether you're new to it, it doesn't matter. We'll be happy to help you get started. So take a look at the Get Involved page, reach out to us or reach out to me personally and I can help you get started with the project. Everyone is welcome and there are no contributions that are too small. All are very valued and the project appreciates everything. So again, thank you. Thank you for this coming to the presentation and thank you to the organizers for the invite.