1616396000
About Xend Finance
Xend Finance is a DeFi platform for cooperatives and credit unions that provides multi-levels of interest by optimizing and aggregating different DeFi lending protocols with the aim of providing high, yet stable currency yields and token rewards to the financially underserved living in unstable economies.
Xend Finance is the first protocol to target a market sector with over $2.2 Trillion of AUM in global credit unions. Centralized and fiat savings platforms are always limited by fees and cross border payments regulations that limit investing in other countries. The Xend Finance decentralized Credit Union protocol is built to optimize, improve and add value to the core operations of credit unions globally, removing the barriers of traditional finance and providing decentralized savings, lending, borrowing and investment operations of credit unions as well as providing multi-level interest returns to members of these unions.
It has been a great journey working on multiple bug fixes and new features suggested by our great community during our successful month-long testnet, where people from over 75 countries participated!
We are happy to announce another great feature added to the “Personal Savings” strategy on the Xend Finance protocol.
Taking you back down the road of our product journey, we started off by building a flexible “Personal Savings” strategy where an individual can save, earn interest on savings, and also withdraw funds at any time. Yes, so people are always very particular about having access to their funds at all times — and rightfully so — but in this case it comes with a tiny cost. One of our token distribution mechanisms is rewarding users with the $XEND token (Xend Finance native token) for saving with the Xend Finance protocol. This reward mechanism is governed by certain parameters of which a high level view can be seen on page 12 of the Xend Finance Litepaper
By incentivizing users with $XEND tokens it leads to having more users participate in the core protocol operations, which leads to growth for our entire ecosystem and benefits all involved. So far we have been able to implement the reward systems only for Esusu and Cooperative saving strategies because funds are locked for a certain period of time which gives the users/members of that Esusu or Cooperative access to the $XEND token reward. For a “Flexible Saving” strategy, rewards can’t be distributed because there is no definite time funds are locked, hence before now individuals on their own could not earn $XEND tokens but we have “fixed” that by having “Fixed Savings” strategy under the “Personal Savings” (pun intended). :D
The fixed strategy is really simple to understand; there is a minimum lockup period ( days for testnet and three months for mainnet ) NOTE: These periods are governable, hence can be updated when governance kicks in.
During this lockup period, funds will not be accessible by the user until after the lockup period.
After the lockup period, the user can withdraw funds and will also receive $XEND tokens as a reward for participating.
I know this may sound interesting and you might like to earn $XEND tokens as much as possible, so, yes, you can have multiple slots in your “Fixed Savings”.
Your “Fixed Savings” interface looks like this ( see Fig 1 )
Fig 1
To view your deposits and make withdrawals, click on the “View Deposits” button. If your deposits have reached maturity, then the “Redeem” button will be active. See Fig 2 below
Fig 2
We are really excited to have built this feature and have more exciting features that we will be shipping in the near future. We would love to get your objective feedback on what we have been doing. Feel free to comment below or send us an email at hello@xend.finance.
First and foremost, our mission is to bring Decentralized Finance (DeFi) and stable currency investment opportunities to credit unions, cooperatives, and underserved communities and regions around the world. In particular, we take seriously our roots and commitment to the African continent in bringing DeFi to the more than 1.5 billion people in the region. As part of that initiative, it’s important that we have a decentralized community that holds $XEND tokens, for which the community will be able to vote on governance and features. Xend Finance is a Decentralized Autonomous Organization (DAO).
We have been overwhelmed by how quickly our community has grown. In November we publicly launched, although it probably helps that it was covered by Coindesk, and that we have Binance and Google Launchpad as our backers. In January we had our testnet, which included over 1,500 participants in 75 countries. In February we formed a real-world partnership with one of the largest Credit Union consolidators in Africa. In March, our Telegram and Twitter communities both crossed 20,000 members, which is not something we would have ever imagined could’ve happened so quickly. And now we’re here.
We’d like to take a moment to go over the different stages of how our $XEND token will be made available and distributed. This plan aims to reward many of you early followers and supporters. It also ensures that we will have a healthy outlook for years to come as we bring people in developing countries the opportunity to earn more from their savings through stable currencies and the opportunities that DeFi enables.
A retrospective review from team DAO Maker:
The Xend Finance Strong Holder Offering SHO took place on the DAO Maker platform during the week 15–21 of February. From the 15th of February, 18:00 UTC to February 18th, 13:00 UTC, people were able to sign-in connecting their Metamask to the DAO Maker platform. This process was a tremendous success with thousands of participants from all around the world. We were getting staggering figures: more than $144M of wealth staked, over $7M of $DAO staked and 3,200 eligible participants and 14,452 issued tickets.
“We can proudly say that Xend Finance SHO has been the most oversubscribed sale to date on the Dao Maker platform.”
Xend Finance will auction 6.65% of total token supply in a Liquidity Bootstrap Pool (LBP) by Balancer. The LBP will launch at 15:00 UTC+0, March 22, 2021 and end at 15:00 UTC+0, March 24, 2021.
XEND LBP Summary
The LBP is a decentralized auction that is similar to a dutch auction, offering fair opportunity for participation and orderly price discovery. The weighting of $XEND in the LBP decreases over the 48-hour auction. This deflationary pricing mechanism discourages front-running and sniping, lengthening the participation window and reducing price volatility during the auction.
The LBP enables participants to purchase tokens patiently without fear-of-missing-out, as the deflationary mechanism will suppress the price over the entire LBP duration. The graph below shows how the deflationary mechanism is offset by inflationary buying pressure over the duration of the LBP.
XEND LBP Chart of Price against Time in hours
Steps to participate in $XEND LBP:
For more information visit Balancer LBP FAQ.
⛔ Countries excluded from Xend Finance LBP: United States, Canada, North Korea, South Korea, Indonesia, Iran, Botswana, Cambodia, Comoros, Ethiopia, Ghana, Pakistan, Panama, Seychelles, Sri Lanka, Syria, Thailand, Trinidad & Tobago, Tunisia, Yemen and any jurisdiction in which the IDO is prohibited, restricted or unauthorised in any form or manner whether in full or in part under the Laws, regulatory requirements or rules in such jurisdiction.
Once the Balancer LBP concludes, we will be adding liquidity to Uniswap so that anyone, anywhere can have trustless access to $XEND tokens. We will disclose after the launch how much liquidity was added to Uniswap by the Xend Finance team. As detailed below, we are taking a multi-faceted approach to building global liquidity which will require resources to deploy across additional trading venues, including those which will support our mainnet in the future.
At Xend Finance, we understand the importance of liquidity if we are to be successful. We also understand diversification across different trading platforms is key to building a robust market. As such, we are in talks with top reputable centralized exchanges globally and intend to expand into these markets shortly after our Uniswap launch as a priority.
We are very excited to give you more opportunities to support the project and underserved communities around the world. If you have more questions, don’t hesitate to ask here in the comments.
Xend Finance Pre-Launch Rewards Program on Binance Smart Chain
How to Buy BNB on Binance and Sending it to your MetaMask
How to Buy BUSD on Binance, Send to MetaMask and Save on Xend Finance
How to Use the MetaMask Mobile App to Save on Xend Finance.
How to Reduce Fees Using the MetaMask App to Save on Xend Finance
Xend Finance Live AMA
Would you like to earn TOKEN right now! ☞ CLICK HERE
XEND has been listed on a number of crypto exchanges, unlike other main cryptocurrencies, it cannot be directly purchased with fiats money. However, You can still easily buy this coin by first buying Bitcoin, ETH, USDT from any large exchanges and then transfer to the exchange that offers to trade this coin, in this guide article we will walk you through in detail the steps to buy XEND
You will have to first buy one of the major cryptocurrencies, usually either Bitcoin (BTC), Ethereum (ETH), Tether (USDT)…
We will use Binance Exchange here as it is one of the largest crypto exchanges that accept fiat deposits.
Binance is a popular cryptocurrency exchange which was started in China but then moved their headquarters to the crypto-friendly Island of Malta in the EU. Binance is popular for its crypto to crypto exchange services. Binance exploded onto the scene in the mania of 2017 and has since gone on to become the top crypto exchange in the world.
Once you finished the KYC process. You will be asked to add a payment method. Here you can either choose to provide a credit/debit card or use a bank transfer, and buy one of the major cryptocurrencies, usually either Bitcoin (BTC), Ethereum (ETH), Tether (USDT)
Step by Step Guide : What is Binance | How to Create an account on Binance (Updated 2021)
Next step - Transfer your cryptos to an Altcoin Exchange
Since XEND is an altcoin we need to transfer our coins to an exchange that XEND can be traded. Below is a list of exchanges that offers to trade XEND in various market pairs, head to their websites and register for an account.
Once finished you will then need to make a BTC/ETH/USDT deposit to the exchange from Binance depending on the available market pairs. After the deposit is confirmed you may then purchase XEND from the exchange: …
Apart from the exchange(s) above, there are a few popular crypto exchanges where they have decent daily trading volumes and a huge user base. This will ensure you will be able to sell your coins at any time and the fees will usually be lower. It is suggested that you also register on these exchanges since once XEND gets listed there it will attract a large amount of trading volumes from the users there, that means you will be having some great trading opportunities!
Top exchanges for token-coin trading. Follow instructions and make unlimited money
☞ https://www.binance.com
☞ https://www.bittrex.com
☞ https://www.poloniex.com
☞ https://www.bitfinex.com
☞ https://www.huobi.com
☞ https://www.mxc.ai
☞ https://www.probit.com
☞ https://www.gate.io
☞ https://www.coinbase.com
Find more information XEND
☞ Website ☞ Whitepaper ☞ Source Code ☞ Social Channel ☞ Social Channel 2 ☞ Social Channel 3 ☞ Message Board ☞ Coinmarketcap
🔺DISCLAIMER: Trading Cryptocurrency is VERY risky. Make sure that you understand these risks if you are a beginner. The Information in the post is my OPINION and not financial advice. You are responsible for what you do with your funds
Learn about Cryptocurrency in this article ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
I hope this post will help you. If you liked this, please sharing it with others. Thank you!
#blockchain #bitcoin #crypto #xend finance #xend
1616396000
About Xend Finance
Xend Finance is a DeFi platform for cooperatives and credit unions that provides multi-levels of interest by optimizing and aggregating different DeFi lending protocols with the aim of providing high, yet stable currency yields and token rewards to the financially underserved living in unstable economies.
Xend Finance is the first protocol to target a market sector with over $2.2 Trillion of AUM in global credit unions. Centralized and fiat savings platforms are always limited by fees and cross border payments regulations that limit investing in other countries. The Xend Finance decentralized Credit Union protocol is built to optimize, improve and add value to the core operations of credit unions globally, removing the barriers of traditional finance and providing decentralized savings, lending, borrowing and investment operations of credit unions as well as providing multi-level interest returns to members of these unions.
It has been a great journey working on multiple bug fixes and new features suggested by our great community during our successful month-long testnet, where people from over 75 countries participated!
We are happy to announce another great feature added to the “Personal Savings” strategy on the Xend Finance protocol.
Taking you back down the road of our product journey, we started off by building a flexible “Personal Savings” strategy where an individual can save, earn interest on savings, and also withdraw funds at any time. Yes, so people are always very particular about having access to their funds at all times — and rightfully so — but in this case it comes with a tiny cost. One of our token distribution mechanisms is rewarding users with the $XEND token (Xend Finance native token) for saving with the Xend Finance protocol. This reward mechanism is governed by certain parameters of which a high level view can be seen on page 12 of the Xend Finance Litepaper
By incentivizing users with $XEND tokens it leads to having more users participate in the core protocol operations, which leads to growth for our entire ecosystem and benefits all involved. So far we have been able to implement the reward systems only for Esusu and Cooperative saving strategies because funds are locked for a certain period of time which gives the users/members of that Esusu or Cooperative access to the $XEND token reward. For a “Flexible Saving” strategy, rewards can’t be distributed because there is no definite time funds are locked, hence before now individuals on their own could not earn $XEND tokens but we have “fixed” that by having “Fixed Savings” strategy under the “Personal Savings” (pun intended). :D
The fixed strategy is really simple to understand; there is a minimum lockup period ( days for testnet and three months for mainnet ) NOTE: These periods are governable, hence can be updated when governance kicks in.
During this lockup period, funds will not be accessible by the user until after the lockup period.
After the lockup period, the user can withdraw funds and will also receive $XEND tokens as a reward for participating.
I know this may sound interesting and you might like to earn $XEND tokens as much as possible, so, yes, you can have multiple slots in your “Fixed Savings”.
Your “Fixed Savings” interface looks like this ( see Fig 1 )
Fig 1
To view your deposits and make withdrawals, click on the “View Deposits” button. If your deposits have reached maturity, then the “Redeem” button will be active. See Fig 2 below
Fig 2
We are really excited to have built this feature and have more exciting features that we will be shipping in the near future. We would love to get your objective feedback on what we have been doing. Feel free to comment below or send us an email at hello@xend.finance.
First and foremost, our mission is to bring Decentralized Finance (DeFi) and stable currency investment opportunities to credit unions, cooperatives, and underserved communities and regions around the world. In particular, we take seriously our roots and commitment to the African continent in bringing DeFi to the more than 1.5 billion people in the region. As part of that initiative, it’s important that we have a decentralized community that holds $XEND tokens, for which the community will be able to vote on governance and features. Xend Finance is a Decentralized Autonomous Organization (DAO).
We have been overwhelmed by how quickly our community has grown. In November we publicly launched, although it probably helps that it was covered by Coindesk, and that we have Binance and Google Launchpad as our backers. In January we had our testnet, which included over 1,500 participants in 75 countries. In February we formed a real-world partnership with one of the largest Credit Union consolidators in Africa. In March, our Telegram and Twitter communities both crossed 20,000 members, which is not something we would have ever imagined could’ve happened so quickly. And now we’re here.
We’d like to take a moment to go over the different stages of how our $XEND token will be made available and distributed. This plan aims to reward many of you early followers and supporters. It also ensures that we will have a healthy outlook for years to come as we bring people in developing countries the opportunity to earn more from their savings through stable currencies and the opportunities that DeFi enables.
A retrospective review from team DAO Maker:
The Xend Finance Strong Holder Offering SHO took place on the DAO Maker platform during the week 15–21 of February. From the 15th of February, 18:00 UTC to February 18th, 13:00 UTC, people were able to sign-in connecting their Metamask to the DAO Maker platform. This process was a tremendous success with thousands of participants from all around the world. We were getting staggering figures: more than $144M of wealth staked, over $7M of $DAO staked and 3,200 eligible participants and 14,452 issued tickets.
“We can proudly say that Xend Finance SHO has been the most oversubscribed sale to date on the Dao Maker platform.”
Xend Finance will auction 6.65% of total token supply in a Liquidity Bootstrap Pool (LBP) by Balancer. The LBP will launch at 15:00 UTC+0, March 22, 2021 and end at 15:00 UTC+0, March 24, 2021.
XEND LBP Summary
The LBP is a decentralized auction that is similar to a dutch auction, offering fair opportunity for participation and orderly price discovery. The weighting of $XEND in the LBP decreases over the 48-hour auction. This deflationary pricing mechanism discourages front-running and sniping, lengthening the participation window and reducing price volatility during the auction.
The LBP enables participants to purchase tokens patiently without fear-of-missing-out, as the deflationary mechanism will suppress the price over the entire LBP duration. The graph below shows how the deflationary mechanism is offset by inflationary buying pressure over the duration of the LBP.
XEND LBP Chart of Price against Time in hours
Steps to participate in $XEND LBP:
For more information visit Balancer LBP FAQ.
⛔ Countries excluded from Xend Finance LBP: United States, Canada, North Korea, South Korea, Indonesia, Iran, Botswana, Cambodia, Comoros, Ethiopia, Ghana, Pakistan, Panama, Seychelles, Sri Lanka, Syria, Thailand, Trinidad & Tobago, Tunisia, Yemen and any jurisdiction in which the IDO is prohibited, restricted or unauthorised in any form or manner whether in full or in part under the Laws, regulatory requirements or rules in such jurisdiction.
Once the Balancer LBP concludes, we will be adding liquidity to Uniswap so that anyone, anywhere can have trustless access to $XEND tokens. We will disclose after the launch how much liquidity was added to Uniswap by the Xend Finance team. As detailed below, we are taking a multi-faceted approach to building global liquidity which will require resources to deploy across additional trading venues, including those which will support our mainnet in the future.
At Xend Finance, we understand the importance of liquidity if we are to be successful. We also understand diversification across different trading platforms is key to building a robust market. As such, we are in talks with top reputable centralized exchanges globally and intend to expand into these markets shortly after our Uniswap launch as a priority.
We are very excited to give you more opportunities to support the project and underserved communities around the world. If you have more questions, don’t hesitate to ask here in the comments.
Xend Finance Pre-Launch Rewards Program on Binance Smart Chain
How to Buy BNB on Binance and Sending it to your MetaMask
How to Buy BUSD on Binance, Send to MetaMask and Save on Xend Finance
How to Use the MetaMask Mobile App to Save on Xend Finance.
How to Reduce Fees Using the MetaMask App to Save on Xend Finance
Xend Finance Live AMA
Would you like to earn TOKEN right now! ☞ CLICK HERE
XEND has been listed on a number of crypto exchanges, unlike other main cryptocurrencies, it cannot be directly purchased with fiats money. However, You can still easily buy this coin by first buying Bitcoin, ETH, USDT from any large exchanges and then transfer to the exchange that offers to trade this coin, in this guide article we will walk you through in detail the steps to buy XEND
You will have to first buy one of the major cryptocurrencies, usually either Bitcoin (BTC), Ethereum (ETH), Tether (USDT)…
We will use Binance Exchange here as it is one of the largest crypto exchanges that accept fiat deposits.
Binance is a popular cryptocurrency exchange which was started in China but then moved their headquarters to the crypto-friendly Island of Malta in the EU. Binance is popular for its crypto to crypto exchange services. Binance exploded onto the scene in the mania of 2017 and has since gone on to become the top crypto exchange in the world.
Once you finished the KYC process. You will be asked to add a payment method. Here you can either choose to provide a credit/debit card or use a bank transfer, and buy one of the major cryptocurrencies, usually either Bitcoin (BTC), Ethereum (ETH), Tether (USDT)
Step by Step Guide : What is Binance | How to Create an account on Binance (Updated 2021)
Next step - Transfer your cryptos to an Altcoin Exchange
Since XEND is an altcoin we need to transfer our coins to an exchange that XEND can be traded. Below is a list of exchanges that offers to trade XEND in various market pairs, head to their websites and register for an account.
Once finished you will then need to make a BTC/ETH/USDT deposit to the exchange from Binance depending on the available market pairs. After the deposit is confirmed you may then purchase XEND from the exchange: …
Apart from the exchange(s) above, there are a few popular crypto exchanges where they have decent daily trading volumes and a huge user base. This will ensure you will be able to sell your coins at any time and the fees will usually be lower. It is suggested that you also register on these exchanges since once XEND gets listed there it will attract a large amount of trading volumes from the users there, that means you will be having some great trading opportunities!
Top exchanges for token-coin trading. Follow instructions and make unlimited money
☞ https://www.binance.com
☞ https://www.bittrex.com
☞ https://www.poloniex.com
☞ https://www.bitfinex.com
☞ https://www.huobi.com
☞ https://www.mxc.ai
☞ https://www.probit.com
☞ https://www.gate.io
☞ https://www.coinbase.com
Find more information XEND
☞ Website ☞ Whitepaper ☞ Source Code ☞ Social Channel ☞ Social Channel 2 ☞ Social Channel 3 ☞ Message Board ☞ Coinmarketcap
🔺DISCLAIMER: Trading Cryptocurrency is VERY risky. Make sure that you understand these risks if you are a beginner. The Information in the post is my OPINION and not financial advice. You are responsible for what you do with your funds
Learn about Cryptocurrency in this article ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
I hope this post will help you. If you liked this, please sharing it with others. Thank you!
#blockchain #bitcoin #crypto #xend finance #xend
1624219980
NFT Art Finance is currently one of the most popular cryptocurrencies right now on the market, so in today’s video, I will be showing you guys how to easily buy NFT Art Finance on your phone using the Trust Wallet application.
📺 The video in this post was made by More LimSanity
The origin of the article: https://www.youtube.com/watch?v=sKE6Pc_w1IE
🔺 DISCLAIMER: The article is for information sharing. The content of this video is solely the opinions of the speaker who is not a licensed financial advisor or registered investment advisor. Not investment advice or legal advice.
Cryptocurrency trading is VERY risky. Make sure you understand these risks and that you are responsible for what you do with your money
🔥 If you’re a beginner. I believe the article below will be useful to you ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
⭐ ⭐ ⭐The project is of interest to the community. Join to Get free ‘GEEK coin’ (GEEKCASH coin)!
☞ **-----CLICK HERE-----**⭐ ⭐ ⭐
Thanks for visiting and watching! Please don’t forget to leave a like, comment and share!
#bitcoin #blockchain #nft art finance token #token #buy nft art finance #how to buy nft art finance token - the easiest method!
1624312800
SPORE FINANCE PREDICTION - WHAT IS SPORE FINANCE & SPORE FINANCE ANALYSIS - SPORE FINANCE
In this video, I talk about spore finance coin and give my spore finance prediction. I talk about the latest spore finance analysis & spore finance crypto coin that recently has been hit pretty hard in the last 24 hours. I go over what is spore finance and how many holders are on this new crypto coin spore finance.
📺 The video in this post was made by Josh’s Finance
The origin of the article: https://www.youtube.com/watch?v=qbPQvdxCtEI
🔺 DISCLAIMER: The article is for information sharing. The content of this video is solely the opinions of the speaker who is not a licensed financial advisor or registered investment advisor. Not investment advice or legal advice.
Cryptocurrency trading is VERY risky. Make sure you understand these risks and that you are responsible for what you do with your money
🔥 If you’re a beginner. I believe the article below will be useful to you ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
⭐ ⭐ ⭐The project is of interest to the community. Join to Get free ‘GEEK coin’ (GEEKCASH coin)!
☞ **-----CLICK HERE-----**⭐ ⭐ ⭐
Thanks for visiting and watching! Please don’t forget to leave a like, comment and share!
#bitcoin #blockchain #spore finance #what is spore finance #spore finance prediction - what is spore finance & spore finance analysis - spore finance #spore finance prediction
1659601560
We are all in the gutter, but some of us are looking at the stars.
-- Oscar Wilde
WordsCounted is a Ruby NLP (natural language processor). WordsCounted lets you implement powerful tokensation strategies with a very flexible tokeniser class.
Are you using WordsCounted to do something interesting? Please tell me about it.
Visit this website for one example of what you can do with WordsCounted.
["Bayrūt"]
and not ["Bayr", "ū", "t"]
, for example.Add this line to your application's Gemfile:
gem 'words_counted'
And then execute:
$ bundle
Or install it yourself as:
$ gem install words_counted
Pass in a string or a file path, and an optional filter and/or regexp.
counter = WordsCounted.count(
"We are all in the gutter, but some of us are looking at the stars."
)
# Using a file
counter = WordsCounted.from_file("path/or/url/to/my/file.txt")
.count
and .from_file
are convenience methods that take an input, tokenise it, and return an instance of WordsCounted::Counter
initialized with the tokens. The WordsCounted::Tokeniser
and WordsCounted::Counter
classes can be used alone, however.
WordsCounted.count(input, options = {})
Tokenises input and initializes a WordsCounted::Counter
object with the resulting tokens.
counter = WordsCounted.count("Hello Beirut!")
Accepts two options: exclude
and regexp
. See Excluding tokens from the analyser and Passing in a custom regexp respectively.
WordsCounted.from_file(path, options = {})
Reads and tokenises a file, and initializes a WordsCounted::Counter
object with the resulting tokens.
counter = WordsCounted.from_file("hello_beirut.txt")
Accepts the same options as .count
.
The tokeniser allows you to tokenise text in a variety of ways. You can pass in your own rules for tokenisation, and apply a powerful filter with any combination of rules as long as they can boil down into a lambda.
Out of the box the tokeniser includes only alpha chars. Hyphenated tokens and tokens with apostrophes are considered a single token.
#tokenise([pattern: TOKEN_REGEXP, exclude: nil])
tokeniser = WordsCounted::Tokeniser.new("Hello Beirut!").tokenise
# With `exclude`
tokeniser = WordsCounted::Tokeniser.new("Hello Beirut!").tokenise(exclude: "hello")
# With `pattern`
tokeniser = WordsCounted::Tokeniser.new("I <3 Beirut!").tokenise(pattern: /[a-z]/i)
See Excluding tokens from the analyser and Passing in a custom regexp for more information.
The WordsCounted::Counter
class allows you to collect various statistics from an array of tokens.
#token_count
Returns the token count of a given string.
counter.token_count #=> 15
#token_frequency
Returns a sorted (unstable) two-dimensional array where each element is a token and its frequency. The array is sorted by frequency in descending order.
counter.token_frequency
[
["the", 2],
["are", 2],
["we", 1],
# ...
["all", 1]
]
#most_frequent_tokens
Returns a hash where each key-value pair is a token and its frequency.
counter.most_frequent_tokens
{ "are" => 2, "the" => 2 }
#token_lengths
Returns a sorted (unstable) two-dimentional array where each element contains a token and its length. The array is sorted by length in descending order.
counter.token_lengths
[
["looking", 7],
["gutter", 6],
["stars", 5],
# ...
["in", 2]
]
#longest_tokens
Returns a hash where each key-value pair is a token and its length.
counter.longest_tokens
{ "looking" => 7 }
#token_density([ precision: 2 ])
Returns a sorted (unstable) two-dimentional array where each element contains a token and its density as a float, rounded to a precision of two. The array is sorted by density in descending order. It accepts a precision
argument, which must be a float.
counter.token_density
[
["are", 0.13],
["the", 0.13],
["but", 0.07 ],
# ...
["we", 0.07 ]
]
#char_count
Returns the char count of tokens.
counter.char_count #=> 76
#average_chars_per_token([ precision: 2 ])
Returns the average char count per token rounded to two decimal places. Accepts a precision argument which defaults to two. Precision must be a float.
counter.average_chars_per_token #=> 4
#uniq_token_count
Returns the number of unique tokens.
counter.uniq_token_count #=> 13
You can exclude anything you want from the input by passing the exclude
option. The exclude option accepts a variety of filters and is extremely flexible.
:odd?
.tokeniser =
WordsCounted::Tokeniser.new(
"Magnificent! That was magnificent, Trevor."
)
# Using a string
tokeniser.tokenise(exclude: "was magnificent")
# => ["that", "trevor"]
# Using a regular expression
tokeniser.tokenise(exclude: /trevor/)
# => ["magnificent", "that", "was", "magnificent"]
# Using a lambda
tokeniser.tokenise(exclude: ->(t) { t.length < 4 })
# => ["magnificent", "that", "magnificent", "trevor"]
# Using symbol
tokeniser = WordsCounted::Tokeniser.new("Hello! محمد")
tokeniser.tokenise(exclude: :ascii_only?)
# => ["محمد"]
# Using an array
tokeniser = WordsCounted::Tokeniser.new(
"Hello! اسماءنا هي محمد، كارولينا، سامي، وداني"
)
tokeniser.tokenise(
exclude: [:ascii_only?, /محمد/, ->(t) { t.length > 6}, "و"]
)
# => ["هي", "سامي", "وداني"]
The default regexp accounts for letters, hyphenated tokens, and apostrophes. This means twenty-one is treated as one token. So is Mohamad's.
/[\p{Alpha}\-']+/
You can pass your own criteria as a Ruby regular expression to split your string as desired.
For example, if you wanted to include numbers, you can override the regular expression:
counter = WordsCounted.count("Numbers 1, 2, and 3", pattern: /[\p{Alnum}\-']+/)
counter.tokens
#=> ["numbers", "1", "2", "and", "3"]
Use the from_file
method to open files. from_file
accepts the same options as .count
. The file path can be a URL.
counter = WordsCounted.from_file("url/or/path/to/file.text")
A hyphen used in leu of an em or en dash will form part of the token. This affects the tokeniser algorithm.
counter = WordsCounted.count("How do you do?-you are well, I see.")
counter.token_frequency
[
["do", 2],
["how", 1],
["you", 1],
["-you", 1], # WTF, mate!
["are", 1],
# ...
]
In this example -you
and you
are separate tokens. Also, the tokeniser does not include numbers by default. Remember that you can pass your own regular expression if the default behaviour does not fit your needs.
The program will normalise (downcase) all incoming strings for consistency and filters.
def self.from_url
# open url and send string here after removing html
end
See contributors.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Author: abitdodgy
Source code: https://github.com/abitdodgy/words_counted
License: MIT license
#ruby #ruby-on-rails
1658068560
WordsCounted
We are all in the gutter, but some of us are looking at the stars.
-- Oscar Wilde
WordsCounted is a Ruby NLP (natural language processor). WordsCounted lets you implement powerful tokensation strategies with a very flexible tokeniser class.
["Bayrūt"]
and not ["Bayr", "ū", "t"]
, for example.Add this line to your application's Gemfile:
gem 'words_counted'
And then execute:
$ bundle
Or install it yourself as:
$ gem install words_counted
Pass in a string or a file path, and an optional filter and/or regexp.
counter = WordsCounted.count(
"We are all in the gutter, but some of us are looking at the stars."
)
# Using a file
counter = WordsCounted.from_file("path/or/url/to/my/file.txt")
.count
and .from_file
are convenience methods that take an input, tokenise it, and return an instance of WordsCounted::Counter
initialized with the tokens. The WordsCounted::Tokeniser
and WordsCounted::Counter
classes can be used alone, however.
WordsCounted.count(input, options = {})
Tokenises input and initializes a WordsCounted::Counter
object with the resulting tokens.
counter = WordsCounted.count("Hello Beirut!")
Accepts two options: exclude
and regexp
. See Excluding tokens from the analyser and Passing in a custom regexp respectively.
WordsCounted.from_file(path, options = {})
Reads and tokenises a file, and initializes a WordsCounted::Counter
object with the resulting tokens.
counter = WordsCounted.from_file("hello_beirut.txt")
Accepts the same options as .count
.
The tokeniser allows you to tokenise text in a variety of ways. You can pass in your own rules for tokenisation, and apply a powerful filter with any combination of rules as long as they can boil down into a lambda.
Out of the box the tokeniser includes only alpha chars. Hyphenated tokens and tokens with apostrophes are considered a single token.
#tokenise([pattern: TOKEN_REGEXP, exclude: nil])
tokeniser = WordsCounted::Tokeniser.new("Hello Beirut!").tokenise
# With `exclude`
tokeniser = WordsCounted::Tokeniser.new("Hello Beirut!").tokenise(exclude: "hello")
# With `pattern`
tokeniser = WordsCounted::Tokeniser.new("I <3 Beirut!").tokenise(pattern: /[a-z]/i)
See Excluding tokens from the analyser and Passing in a custom regexp for more information.
The WordsCounted::Counter
class allows you to collect various statistics from an array of tokens.
#token_count
Returns the token count of a given string.
counter.token_count #=> 15
#token_frequency
Returns a sorted (unstable) two-dimensional array where each element is a token and its frequency. The array is sorted by frequency in descending order.
counter.token_frequency
[
["the", 2],
["are", 2],
["we", 1],
# ...
["all", 1]
]
#most_frequent_tokens
Returns a hash where each key-value pair is a token and its frequency.
counter.most_frequent_tokens
{ "are" => 2, "the" => 2 }
#token_lengths
Returns a sorted (unstable) two-dimentional array where each element contains a token and its length. The array is sorted by length in descending order.
counter.token_lengths
[
["looking", 7],
["gutter", 6],
["stars", 5],
# ...
["in", 2]
]
#longest_tokens
Returns a hash where each key-value pair is a token and its length.
counter.longest_tokens
{ "looking" => 7 }
#token_density([ precision: 2 ])
Returns a sorted (unstable) two-dimentional array where each element contains a token and its density as a float, rounded to a precision of two. The array is sorted by density in descending order. It accepts a precision
argument, which must be a float.
counter.token_density
[
["are", 0.13],
["the", 0.13],
["but", 0.07 ],
# ...
["we", 0.07 ]
]
#char_count
Returns the char count of tokens.
counter.char_count #=> 76
#average_chars_per_token([ precision: 2 ])
Returns the average char count per token rounded to two decimal places. Accepts a precision argument which defaults to two. Precision must be a float.
counter.average_chars_per_token #=> 4
#uniq_token_count
Returns the number of unique tokens.
counter.uniq_token_count #=> 13
You can exclude anything you want from the input by passing the exclude
option. The exclude option accepts a variety of filters and is extremely flexible.
:odd?
.tokeniser =
WordsCounted::Tokeniser.new(
"Magnificent! That was magnificent, Trevor."
)
# Using a string
tokeniser.tokenise(exclude: "was magnificent")
# => ["that", "trevor"]
# Using a regular expression
tokeniser.tokenise(exclude: /trevor/)
# => ["magnificent", "that", "was", "magnificent"]
# Using a lambda
tokeniser.tokenise(exclude: ->(t) { t.length < 4 })
# => ["magnificent", "that", "magnificent", "trevor"]
# Using symbol
tokeniser = WordsCounted::Tokeniser.new("Hello! محمد")
tokeniser.tokenise(exclude: :ascii_only?)
# => ["محمد"]
# Using an array
tokeniser = WordsCounted::Tokeniser.new(
"Hello! اسماءنا هي محمد، كارولينا، سامي، وداني"
)
tokeniser.tokenise(
exclude: [:ascii_only?, /محمد/, ->(t) { t.length > 6}, "و"]
)
# => ["هي", "سامي", "وداني"]
The default regexp accounts for letters, hyphenated tokens, and apostrophes. This means twenty-one is treated as one token. So is Mohamad's.
/[\p{Alpha}\-']+/
You can pass your own criteria as a Ruby regular expression to split your string as desired.
For example, if you wanted to include numbers, you can override the regular expression:
counter = WordsCounted.count("Numbers 1, 2, and 3", pattern: /[\p{Alnum}\-']+/)
counter.tokens
#=> ["numbers", "1", "2", "and", "3"]
Use the from_file
method to open files. from_file
accepts the same options as .count
. The file path can be a URL.
counter = WordsCounted.from_file("url/or/path/to/file.text")
A hyphen used in leu of an em or en dash will form part of the token. This affects the tokeniser algorithm.
counter = WordsCounted.count("How do you do?-you are well, I see.")
counter.token_frequency
[
["do", 2],
["how", 1],
["you", 1],
["-you", 1], # WTF, mate!
["are", 1],
# ...
]
In this example -you
and you
are separate tokens. Also, the tokeniser does not include numbers by default. Remember that you can pass your own regular expression if the default behaviour does not fit your needs.
The program will normalise (downcase) all incoming strings for consistency and filters.
def self.from_url
# open url and send string here after removing html
end
Are you using WordsCounted to do something interesting? Please tell me about it.
Visit this website for one example of what you can do with WordsCounted.
Contributors
See contributors.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Author: Abitdodgy
Source Code: https://github.com/abitdodgy/words_counted
License: MIT license