Trending February 2024 # Microsoft Account Locked For No Reason / Violating Terms: Fix # Suggested March 2024 # Top 5 Popular

You are reading the article Microsoft Account Locked For No Reason / Violating Terms: Fix updated in February 2024 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested March 2024 Microsoft Account Locked For No Reason / Violating Terms: Fix

Microsoft Account Locked For No Reason / Violating Terms: Fix You can get in touch with customer support to get back your account




It can be pretty annoying if you forget the password for your Microsoft account and are locked out of it.

We would suggest you follow the recover password wizard or use the Password Reset Disk to recover your password.



To fix Windows PC system issues, you will need a dedicated tool

Fortect is a tool that does not simply cleans up your PC, but has a repository with several millions of Windows System files stored in their initial version. When your PC encounters a problem, Fortect will fix it for you, by replacing bad files with fresh versions. To fix your current PC issue, here are the steps you need to take:

Download Fortect and install it on your PC.

Start the tool’s scanning process to look for corrupt files that are the source of your problem

Fortect has been downloaded by


readers this month.

If you forget the Microsoft account password, then there are multiple issues attached to it. If you have set it up to log in to your PC, then you won’t be able to do that. Plus, you won’t be able to use any of the apps that require a Microsoft account login.

While there are legitimate reasons for getting locked out of a Microsoft account, some users face this issue without any reason. Whatever the case may be, if you are reading this guide, then you are surely in need of some help to guide to resolve the locked out of Microsoft account problem.

Why does it say my Microsoft account was locked for violating terms?

You receive an email or error message saying:

Your account has been locked.

We’ve detected some activity that violates our Microsoft Services Agreement and have locked your account.

This means that you have violated or done something that is against Microsoft policies (for example, using a VPN or using the account on too many devices) which is the reason Microsoft has blocked your account.

Also, this could be because Microsoft detected some unusual activities, which could be because someone tried to hack into your account. Microsoft also takes this step to protect your account from fraud and abuse.

To unlock your account, you need to sign in to your Microsoft Account and follow the on-screen prompts to receive a security code and reset your password.

How long does a Microsoft account stay locked?

There is no specific time duration till your Microsoft account can stay locked. If it is a temporary lock, then you can retrieve your account back in minutes or within 24 hours.

What can I do if I’m locked out of my Microsoft account? 1. Use online security code

Try signing in to your Microsoft account.

You can use any phone number to gain access to your Microsoft account.

Enter the phone number and press the Send code button.

Enter the received security code.

Go ahead and change the Microsoft account password.

This is the most easiest and official way of fixing the locked out of Microsoft account problem. You will receive a security code which you need to enter in order to reset your password.

There are a bunch of scenarios that you will face while following the above method.

In case you did not receive the security code, here are a few things that you can check:

Check if your phone isn’t blocking text from unknown numbers.

Check the spam folder on your email account if you used the email option.

Was the number or email entered correctly?

If nothing works, then you can fill out this online form and get in touch with Microsoft customer service which will help you to recover your account.

Expert tip:

2. Use Windows Password Reset Disk Create Password Reset Disk Use Password Reset Disk to recover the password

Assuming that you have created the Password Reset Disk before getting locked out, you can easily use the USB flash drive to recover your password.

Since, most of the time, you will be locked out of your Microsoft account because you have entered the wrong password multiple times, you can make use of this disk to reset the password before it locks you out.

This will work, no matter how many times you change your password. So, once you have created a Password Reset Disk, keep it handy.

If you are not able to recover your Microsoft account password, then it is best to contact customer support.

You can visit this link and provide information about your problem, and hope that the support will help you resolve the issue.

In case that also does not work, then the last chance that you have is to create a new Microsoft account and use it everywhere for your Microsoft-related works.

Multiple users have also reported that they are facing The referenced account is locked out on Windows 11 problem. This could happen if you have entered the wrong password multiple times and in such a case, you need to remove the account threshold.

Also, users have reported that they can’t log into Windows. In such a scenario, we would suggest you check your username and password and make sure they are correct.

If the Windows login screen is missing, some important files are missing or your installation may be damaged. To resolve this, you might have to repair it.

For users who aren’t able to log in with their Microsoft account in Windows 10, they can refer to our guide which lists some effective solutions to resolve the problem.

Outlook users also face trouble logging into their account if their account is suspended. We have a guide that will help you get access back to your account.

Still experiencing issues?

Was this page helpful?


Start a conversation

You're reading Microsoft Account Locked For No Reason / Violating Terms: Fix

Your Account Has Been Locked – Microsoft

This post explains how to fix Microsoft Account error Your account has been locked. Several users have reported that Microsoft has locked their accounts without any prior notice, due to which they are not able to access their emails, documents, photos, Xbox Live accounts, and other essential data.

When they try to get access to a Microsoft product or cloud service using their personal or work account, an error message appears that says:

Your account has been locked. Contact your support person to unlock it, then try again.


Your account has been locked

We have detected some activity that violates our Microsoft Services Agreement and have locked your account.

Unlocking your account

To unlock your account, you’ll need some additional assitance. Navigate to chúng tôi and we’ll get you to the right place.


Your account has been locked

We’ve detected some activity that violates our Microsoft Services Agreement and have locked your account.

Unlocking your account

Choose Next and we’ll send a verification code to your phone. After you enter the code, you can get back into your account.

According to users, the error triggers while using Outlook, Skype, Xbox Live, etc., or while accessing Microsoft Azure.

Why my Microsoft account has been locked?

Microsoft states that it locks a user account when it notices some unusual activity that might violate its Terms of Use. These activities may include sending unsolicited promotional or commercial content, sending unwanted or harmful code or software, tricking or spoofing emails, etc. However, Microsoft also states that not all accounts are locked for such reasons.

If you’re one of the affected users and cannot use your Microsoft account, we will show you how to successfully unlock a locked Microsoft account.

Your account has been locked – Microsoft

The error message can appear if you enter an incorrect password while signing in to the Microsoft 365 portal with your work or school account. In that case, you should wait for at least 15 minutes and then try to sign in again. If the error continues to show up, try using the browser Incognito/private mode or switching to another browser. If it persists or in other cases, use the following solutions to fix Microsoft Account error Your account has been locked:

Unlock your Microsoft account with a security code.

Use Microsoft’s automated self-help.

Uninstall and reinstall Microsoft 365.

Escalate the matter to your IT Admin.

Contact Microsoft.

Let us see these in detail.

1] Unlock your Microsoft account with a security code

This applies if you see a ‘Next‘ button within the error prompt window. If you don’t see a ‘Next’ button, go to step 5.

Read: Unblock and Recover a blocked or suspended Microsoft account.

2] Use Microsoft’s automated self-help

Before you talk to someone for personalized support, try Microsoft’s automated self-help and see if it works. It will get your questions answered conveniently.

Read: How to reclaim your hacked Microsoft Account

3] Uninstall and reinstall Microsoft 365

The error may appear if your ex-employer had enabled Office 365 on your personal device. In such a case, after you leave the organization, your license is revoked, so you can’t use your work account to access Microsoft 365 apps on your personal device. However, the error prompt appears if the information related to your work account is still available on your device (the same applies to a school account).

To completely remove this information, you must manually completely uninstall Office from your device. You can also use the Microsoft Office Uninstaller Tool for this purpose.

Once you’ve uninstalled Office, reinstall Microsoft 365 on your Windows device.

This should resolve the issue and allow you to sign in to Microsoft 365 apps without any error prompts.


Make sure you’re logged in as an administrator.

Take a backup of your files and data in Word, Excel, and other Microsoft 365 apps before uninstalling Office.

Read: How to fix Microsoft Office installation errors

4] Escalate the matter to your IT Admin

If you see this error while trying to sign in to Microsoft Azure or Microsoft 365, contact the global admin of your talent to check if you’re allowed to sign in. If not, request him to reset your password or your sign-in status (from allowed to blocked and then back to allowed). If you’re the (only) admin, get in touch with the Azure Data Protection team by dialing (+1) 866-807-5850. They’ll help you with unlocking your account.

If this is your Azure AD account, you may use self-service password reset (SSPR) to unblock yourself with no administrator or help desk involvement.

5] Contact Microsoft

If nothing works, contact Microsoft using Global Customer Service phone numbers or using the account reinstatement form. Once Microsoft receives your information, a ticket will be assigned to you. Then a Microsoft customer service representative will get in touch with you via email to give you status updates, request more information, or guide you on how to unlock the account.

I hope this helps.

Also Read: Your Microsoft Account has been locked, 0x80a40014 – Xbox error.

How long is Microsoft account locked for?

It depends. If it is a work or school account, the global admin of your tenant may have imposed an Account lockout duration (0 through 99,999 minutes) via group policy settings. Value ‘0’ signifies that the account will only be unlocked by the administrator. Other values signify that the account will remain locked out for n minutes (where ‘n’ can be 1 to 99,999) before automatically becoming unlocked.

If it is a personal account and you’ve reached Microsoft support for unblocking your account, they contact you via email, typically within 24 hours of submitting the request, and assign you a ticket number. You will continue to receive more emails until the issue is resolved; however, the actual time it will take for your account to be unlocked cannot be confirmed.

Read Next: Fix A user account was locked out error in Windows.

What Is A Personal Account In Microsoft Teams?

In its early days, Microsoft Teams used to cater strictly to working professionals and workspaces, allowing them to get work done even away from the office. Over the last year, Microsoft Teams has grown a different perspective.  Not only has it taken its productivity features a notch higher, but it has also made the software a lot friendlier for non-professional users. 

Today, we’ll be taking a look at Microsoft’s efforts of making Teams more welcoming. Today, we’ll tell you all about Personal Accounts in Microsoft Teams. 

Related: How To Make Free Video Calls On Microsoft Teams Personal to Family And Friends

What does Personal Account mean in Teams? 

As you may already know, Microsoft Teams is one of the most popular video collaborating tools on the planet. It may not be as popular as Zoom in some areas, but it surely is a more trusted brand across workspaces in the United States. It has a plethora of tools available for your convenience, and Microsoft has vouched to give the product as many software updates as it needs to be more widely accepted. 

Related: How To Use Live Emoji on Microsoft Teams 

What is the benefit of a Personal Account? 

Since most of the world has started to get accustomed to virtual office spaces and work from home sessions, the line between personal and professional lives has become blurrier than ever. The situation has given way to exhaustion and overall poor quality of life, which is damaging, to say the least.

Microsoft Teams has been keeping tabs on burnout and work/social life balance from the very beginning and believes having a personal account would help in that regard. When switched to your Personal Account, you won’t be notified of your work assignments, and the office Channels and chats would also disappear.

This allows you to tune out the noise and “leave office” in the truest sense. Additionally, since your personal account resides inside Microsoft Teams, you will not need to download a separate application to get in touch with your friends and family. 

How to set up a Personal Account in Microsoft Teams 

As we’ve discussed, you don’t need to jump through hoops to create a Personal account in Microsoft Teams. By default, every Microsoft Teams user — both free and paid — is given the option to switch to their Personal Account when they feel like it. However, since Microsoft requires your phone number to begin the authorization process, you cannot create your Personal Account right from the desktop application.

You will need the Microsoft Teams app on your mobile to start the procedure and only add it to the desktop client after completing it successfully. So, in a way, the desktop client is nothing but a fancy companion app for the mobile app.

It is to be noted the Personal account option was introduced to the mobile client first, in the second quarter of 2023. Microsoft extended support to the desktop client over six months later. 


Microsoft Teams also comes with a fully decked mobile application for both Android and iOS. Similar to the desktop application, Microsoft Teams on mobile allows you to switch accounts on the fly. First, launch the Microsoft Teams app on your smartphone and log in. Now, tap on your profile picture thumbnail at the top-left corner of the screen. 

At the bottom of the panel, you’ll see the accounts that are associated with the device. Then, tap on ‘Personal.’

Microsoft Teams would ask you to re-enter the password you logged in with. On the next screen, you would be asked to put down your contact number. Enter your number and tap on ‘Next.’

It is to be noted that you’ll need to enter a number that hasn’t yet been associated with any other Microsoft Teams profile. Also, since it’s a mandatory step, you’ll need to put one down if you wish to use the Personal account.

If everything goes according to plan, you’ll be greeted with the Microsoft Teams Personal account page. Tap on ‘Get started’ to begin.

On the next page, you’ll have to confirm your name and add a profile picture. You could change both by hitting the ‘Pen’ / ‘Edit’ icon respectively. After finalizing, tap on ‘Continue.’

Teams offers you the option to find your friends. It’ll need to sync your contacts app to do so. Check the ‘Yes! Sync my contacts’ option and tap on ‘Continue’ to begin. Once you’ve checked all the aforementioned boxes, you’ll be taken to the Microsoft Teams landing page.

That’s it! You’ll now be able to chat with your friends and family right from the mobile application.


If you have the Microsoft Teams application on your desktop, log in with your username and password. For assistance, feel free to check out our extensive guide on creating a free account in Microsoft Teams.

After signing in successfully, Microsoft Teams would open a new Window, containing all your personal texts and calls. 

What are the differences between Personal and Professional accounts?

Microsoft Teams believes it’s important for us to keep our professional and personal accounts separate. When you switch over to your personal account, not only will you not have work-related disturbances, but Microsoft Teams will also launch a completely new instance — window — with your Personal Account contacts.

The company has gone to great lengths to assure your peace of mind, which means the differences will not be very subtle.

Time limit

Microsoft Team free account allows you to connect to up to 100 people at a time for 60 minutes. If you exceed the 30-minute mark, you’ll be thrown out of the meeting.

Through the personal account, you can connect to up to 300 people for up to 24 hours. Group chats, on the other hand, can accommodate up to 250 people.  Microsoft hasn’t yet confirmed how long its generosity would last, but we are hopeful of seeing it outlast the pandemic. Microsoft believes the Personal account to be an integral part of its community and wishes to keep it accessible as long as possible.


The Personal Account section in Microsoft Teams looks and feels a lot different than its professional counterpart. When you switch to your personal account, a separate instance of Teams gets launched, which makes it easier to keep a tab on both your personal and professional messages.

Of course, there aren’t Channels in the Personal Account, and chats are given the highest priority. Unlike the professional version, you won’t have quick access to calls in Personal Account, but there is a neat calendar baked in for convenience. 


Signing up for Microsoft Teams is easy. You go to the website, sign up, or download one of the clients to sign up from there. Once you’ve logged in, you would be able to all the features, in all their glory from any client you like. 

Your Personal Account, on the other hand, requires a lot more finesse. Since it’s not a separate app — and lives within the Microsoft Teams app — you cannot download it exclusively from the website. After you’ve downloaded and installed Microsoft Teams on your smartphone, you would be able to register your Personal Account from there. As of now, the desktop client isn’t capable of creating a Personal Account, but it can register the account your created through the mobile app pretty easily. Once the account is linked, you’ll be able to receive personal messages on your computer. 

Calling and recording

The professional end of Microsoft Teams allows you to send an invite link to potential meeting participants, even if they don’t have Teams. You can do the same through your Personal Account as well — call someone even if they don’t have access to Teams. However, video recording hasn’t yet arrived for Personal Accounts. 

You can chat, start an audio/video call with any user you like and screen sharing is also permitted. Microsoft hasn’t revealed its plans for video recording yet. 

Why don’t you have the option to ‘Add Personal Account’? 

In the guide above, we talked in length about adding your Personal Account through the desktop client, about how the verification is done through the ‘Add Personal Account’ button. However, there’s a chance of not seeing the button entirely, and we’ll tell you why that is. 

As of now, the ‘Add Personal Account’ button is only available to premium account holders. So, if you happen to have a free account, you’ll not have the option to verify your credential through the desktop client. Thankfully, the mobile client doesn’t discriminate between free and premium users. You would be able to sign up for your Personal Account from the mobile client and then carry it over to your computer. 

That’s it! Your personal account would be launched in a separate window. 


Nlp – Tags, Frequencies, Unique Terms, N

This article was published as a part of the Data Science Blogathon

Source: scribble from my notebook

The data being used here is a subset of Company Reviews scraped from Indeed. The intention or objective is to analyze the text data (specifically the reviews) to find:

– Frequency of reviews

– Descriptive and action indicating terms/words – Tags

– Sentiment score

– Create a list of unique terms/words from all the review text

– Frequently occurring terms/words for a certain subset of the data

– The n-grams and to create a DataFrame of the n-grams

Later we will check the spell-checking functionality and one of the ways I have used it is by assigning it to a separate spell-checked column.

Libraries and Reading the file  import pandas as pd import numpy as np import re import nltk from nltk.corpus import stopwords from nltk.tokenize import sent_tokenize, word_tokenize'stopwords')'punkt')'wordnet')'averaged_perceptron_tagger') import textblob from textblob import TextBlob from sklearn.feature_extraction.text import CountVectorizer from functools import reduce import operator import collections from collections import Counter import datetime as dt import seaborn as sns import matplotlib.pyplot as plt import warnings warnings.filterwarnings('ignore') df = pd.read_excel("Reviews_from_Indeed.xlsx", index_col=0) df.head() Function for cleaning the text content def preprocessing(text): # removing punctuations, unwanted characters and converting to lowercase text = re.sub("[^-9A-Za-z ]", "", text).lower() # removing stopwords and tokenizing stop = stopwords.words("english") tokens = [word for word in (token for token in word_tokenize(text)) if word not in stop] # lemmatizing lmtzr = nltk.WordNetLemmatizer() preprocessed_text = ' '.join([lmtzr.lemmatize(word) for word in tokens]) return preprocessed_text

– Applying the ‘preprocessing’ function to our ‘Review’ column:

df['Review'] = df['Review'].astype(str) df['PP_Review'] = df['Review'].apply(preprocessing) Frequency of Reviews

To start our analysis we will check the frequency distribution of reviews by “month”, first for the entire data and then for 2023 and 2023. For this we will extract the “month”, and “year” portions from our ‘Date’ column.

df['Date'] = pd.to_datetime(df['Date']) df['Month'] = df['Date'].dt.month df['Year'] = df['Date'].dt.year

We group the review data by month, which we will then use in our plots:

revbymonth = df.groupby('Month').agg(Count=('Review','count')).sort_values('Month', ascending=True) sns.catplot(data=revbymonth.reset_index(), kind='bar', x='Month', y='Count', alpha=0.9, height=3, aspect=4) ax=plt.gca() for p in ax.patches: ax.text(p.get_x() + p.get_width()/5., p.get_height(), '%d' % int(p.get_height()), fontsize=12, color ='blue', ha='center', va='bottom') plt.title('Frequency of Reviews by Month', fontsize=15, color='Black') plt.tick_params(axis='x', rotation=-15, labelsize=10)

Similarly below we group the review data by month, for 2023 and 2023 to facilitate their respective plots:

revbymonth_2024 = df[df['Year']==2024].groupby('Month').agg(Count = ('Review','count')).sort_values('Month', ascending=True) revbymonth_2024 = df[df['Year']==2024].groupby('Month').agg(Count = ('Review','count')).sort_values('Month', ascending=True) sns.catplot(data=revbymonth_2024.reset_index(), kind='bar', x='Month', y='Count', alpha=0.9, height=3, aspect=4) ax=plt.gca() for p in ax.patches: ax.text(p.get_x() + p.get_width()/5., p.get_height(), '%d' % int(p.get_height()), fontsize=12, color ='blue', ha='center', va='bottom') plt.title('Frequency of Reviews by Month for 2023', fontsize=15, color='Black') plt.tick_params(axis='x', rotation=-15, labelsize=10) sns.catplot(data=revbymonth_2024.reset_index(), kind='bar', x='Month', y='Count', alpha=0.9, height=3, aspect=4) ax=plt.gca() for p in ax.patches: ax.text(p.get_x() + p.get_width()/5., p.get_height(), '%d' % int(p.get_height()), fontsize=12, color ='blue', ha='center', va='bottom') plt.title('Frequency of Reviews by Month for 2023', fontsize=15, color='Black') plt.tick_params(axis='x', rotation=-15, labelsize=10) revbyloc_2024 = df[df['Year']==2024].groupby('Location').agg(Count = ('Review','count')).sort_values('Count', ascending=False).nlargest(10, 'Count') revbyloc_2024 = df[df['Year']==2024].groupby('Location').agg(Count = ('Review','count')).sort_values('Count', ascending=False).nlargest(10, 'Count') sns.catplot(data=revbyloc_2024.reset_index(), kind='bar', x='Location', y='Count', alpha=0.9, height=3, aspect=5) ax=plt.gca() for p in ax.patches: ax.text(p.get_x() + p.get_width()/5., p.get_height(), '%d' % int(p.get_height()), fontsize=12, color ='blue', ha='center', va='bottom') plt.title('Frequency of Reviews by Location for 2023', fontsize=15, color='Black') plt.tick_params(axis='y', rotation=0, labelsize=10) sns.catplot(data=revbyloc_2024.reset_index(), kind='bar', x='Location', y='Count', alpha=0.9, height=3, aspect=5) ax=plt.gca() for p in ax.patches: ax.text(p.get_x() + p.get_width()/5., p.get_height(), '%d' % int(p.get_height()), fontsize=12, color ='blue', ha='center', va='bottom') plt.title('Frequency of Reviews by Location for 2023', fontsize=15, color='Black') plt.tick_params(axis='y', rotation=0, labelsize=10) Descriptive and action indicating terms/words – Tags df['t_PP_Review'] = df.apply(lambda row: nltk.word_tokenize(row['PP_Review']), axis=1) df['POS_Tags'] = df.apply(lambda row: nltk.pos_tag(row['t_PP_Review']), axis=1) # functions for separating the POS Tags def adjectives(text): blob = TextBlob(text) return [word for (word,tag) in chúng tôi if tag == 'JJ'] def verbs(text): blob = TextBlob(text) return [word for (word,tag) in chúng tôi if tag.startswith('VB')] blob = TextBlob(text) return [word for (word,tag) in chúng tôi if tag.startswith('RB')] def nouns(text): blob = TextBlob(text) return [word for (word,tag) in chúng tôi if tag.startswith('NN')] df['Adjectives'] = df['PP_Review'].apply(adjectives) df['Verbs'] = df['PP_Review'].apply(verbs) df['Nouns'] = df['PP_Review'].apply(nouns) df[['POS_Tags', 'Adjectives', 'Verbs', 'Adverbs', 'Nouns']].head()

Now, let’s see some adjectives occurring for Location like ‘Remote’ since most of the operations went into that mode post-pandemic situation.


We can then use the below function to generate a list of adjectives. Please note we will be using the termfreq() function later as well when we get into creating term-frequency.

# function to convert token to list and unpack def termfreq(x): dlist = x.tolist() return (reduce(operator.add, dlist)) termfreq(adj_remote['Adjectives']) Sentiment Score and creating a column of Unique_Terms/Words df['Sentiment_Score'] = df['PP_Review'].apply(lambda x: TextBlob(x).sentiment[0]) df['Unique Terms'] = df['PP_Review'].str.split().explode().drop_duplicates().groupby(level=0).apply(list) df[['Review', 'Rating','Month', 'Year', 'Sentiment_Score', 'Unique Terms']].head()

Now, checking the correlation between Rating and Sentiment_Score is one thing we can do, and taking, 0.8 to be the threshold both ways and based on the value we get, we can further look into the Review vs Rating aspect of the data.

df['Rating'].corr(df['Sentiment_Score']) Function for term/word frequency # function to convert token to list and unpack def termfreq(x): dlist = x.tolist() return (reduce(operator.add, dlist)) # function to count the term/word and create a dataframe for frequencies def counting(x, y): from collections import Counter Counter = Counter(x) most_occurrences = Counter.most_common() count_df = pd.DataFrame(most_occurrences, columns = ['Word', 'Count']) print(count_df.shape) display(count_df.head(15)) count_df.to_excel(f'Frequency{y}.xlsx')

We can, not only, build WordClouds , but it also gives a quick and effective snapshot of important terms/words about the data in question. For instance, below is the illustration for October of 2023 and 2023 taking note that it is applied to the tokenized column (t_PP_Review in Step-5), where we see some common positive terms like “great”, “place”, and “work”; and then different terms like “insurance” and “benefit” in 2023 along with “management” and “sale” in 2023. Please note, below is just a snapshot (of output reference to the code), and based on the output we can further clean the data. NLP is a great tool for text processing.

freq_2024_10 = df[(df['Year']==2024)&(df['Month']==10)] counting(termfreq(freq_2024_10['t_PP_Review']), 1) freq_2024_10 = df[(df['Year']==2024)&(df['Month']==10)] counting(termfreq(freq_2024_10['t_PP_Review']), 2)

October, 2023                                                                                  October, 2023


Lastly, our analysis rounds up with the addition of n-grams analysis, where we create bi-, tri-, and quad-grams.

Refence for n-grams function:

View the code on Gist.

def listandtokenize(data): yourlist = data.tolist() string = ' '.join(map(str, yourlist)) return re.findall(r'w+', string.lower()) # function to prepare n-grams def count_ngrams(lines, min_length=2, max_length=4): lengths = range(min_length, max_length+1) ngrams = {length: collections.Counter() for length in lengths} queue = collections.deque(maxlen = max_length) def add_queue(): current = tuple(queue) for length in lengths: ngrams[length][current[:length]] +=1 for line in lines: for word in nltk.word_tokenize(line): queue.append(word) add_queue() queue.popleft() add_queue() return ngrams

We can use the below function if we only want to print the n-grams and as illustrated:

# function to print 15 most frequent n-grams # change the print number as applicable def print_most_freq_ng(ngrams, num=15): for n in sorted(ngrams): for gram, count in ngrams[n].most_common(num): print('{0}: {1}'.format(' '.join(gram), count)) print('') print_most_freq_ng(count_ngrams(listandtokenize(df['PP_Review'])))

I also wanted the n-grams output to be fed into a DataFrame for dashboard purpose and for that added the components within the “print_most_freq_ng” function to save the n-grams data into a DataFrame. First, let’s define respective DataFrames:

bigramtodf = pd.DataFrame({'2-grams': [], '2-grams freq': []}) trigramtodf = pd.DataFrame({'3-grams': [], '3-grams freq': []}) quadgramtodf = pd.DataFrame({'4-grams': [], '4-grams freq': []})

Then we modify the function as follows and apply it:

def print_most_freq_ng(ngrams, num=15): global bigramtodf, trigramtodf, quadgramtodf for n in sorted(ngrams): for gram, count in ngrams[n].most_common(num): print('{0}: {1}'.format(' '.join(gram), count)) if n == 2: bigramtodf = bigramtodf.append({'2-grams': gram, '2-grams freq': count}, ignore_index=True) elif n == 3: trigramtodf = trigramtodf.append({'3-grams': gram, '3-grams freq': count}, ignore_index=True) else: quadgramtodf = quadgramtodf.append({'4-grams': gram, '4-grams freq': count}, ignore_index=True) print('') print_most_freq_ng(count_ngrams(listandtokenize(df['PP_Review']))) ngramdf = pd.concat([bigramtodf, trigramtodf, quadgramtodf], axis=1) ngramdf

df['PP_Review'] = df['PP_Review'].astype(str) df['SC_PP_Review'] = df['PP_Review'].apply(lambda x: str(TextBlob(x).correct())) EndNote

There will be instances of the same word appearing across n-grams especially on the higher-grams (if I may call it so) which we can remove using ‘set’ and ‘len’. Something for the next content.

Carpe diem! Thank you very much!

The media shown in this article is not owned by Analytics Vidhya and are used at the Author’s discretion


Fix Google Chrome Not Syncing: Bookmarks, Google Account, Tabs

Fix Google Chrome not Syncing: Bookmarks, Google account, Tabs Third-party antiviruses have been found to affect the syncing feature








Despite the constant updates, Chrome users still encounter syncing issues.

In this article, you’ll find useful ideas on how to deal with syncing problems in Chrome.

The first solution is to try an alternative browser that you can discover by reading on.

Try Opera One, a browser with various functionalities already built-in!

A flawless browser like Opera has most functions already under the hood.

Here’s what’s included by default:

Easy and intuitive workspace management

Ad-blocker mode integrated to load pages faster

WhatsApp and Facebook Messenger

Customizable Ul and AI-friendly

⇒ Get Opera One

Google Chrome is the most popular browser, with a big market share. Despite Microsoft’s attempts to convince Windows users to switch to Edge, the majority runs Google’s browser on their machines. But Chrome not syncing is a common problem faced by many.

Many users complain that the problem is preventing them from using the themes, passwords, and navigation history previously saved in the browser.

If Chrome is not syncing in Windows, you can use the solutions listed below to fix this problem.

Why does my Chrome keep not syncing?

The very first thing you should verify is that syncing is enabled on Chrome. Also, make sure that the items you are having a problem syncing are not disabled in the browser settings, because that’s often the reason behind the problem.

Third-party antiviruses have been found to affect the syncing feature in Chrome. So, if you have any installed, ensure that it’s not causing trouble.

Extensions are also a likely reason in case Chrome is not syncing between devices. Besides, corrupt browsing data too has been found responsible for this issue.

No matter which of these is the underlying cause on your device, the solutions listed here should eliminate the problem in no time.

Quick Tip:

If you notice that Chrome is frequently faulty when it comes to syncing, perhaps it’s time that you tried an alternative browser.

Opera One comes with customized versions for PC, mobile (including older phones), Mac, or Linux. Besides, you can synchronize the Opera One browser across all your devices, to easily manage all the settings.

Opera One

Switch browsers and get effective syncing between your devices with Opera One.

Free Visit Website

How do I force Chrome to sync? 1. Re-enable sync

Oftentimes, the Google account is not syncing in Chrome if the feature has run into an issue. In this case, simply re-enabling syncing should do the job.

2. Check your antivirus

According to users, if Chrome doesn’t sync on your PC, the issue might be your antivirus. An antivirus is a necessity, but certain antivirus tools can interfere with Chrome and cause various problems.

You might want to try disabling certain features of your antivirus and check if that helps. If that doesn’t help, you can also completely disable your antivirus and check if that solves the problem.

If the issue is still present, you might have to remove your antivirus. Hopefully, you won’t have to get that far.

3. Reinstall Chrome

If you’re having this problem on your PC, you might want to consider reinstalling Chrome. Few users reported that Chrome doesn’t sync on their PC, but they managed to fix the problem simply by reinstalling it.

There are several ways to uninstall an application, but the best is to use dedicated uninstaller software.

We suggest using a professional tool to make sure that the process runs completely without leaving traces in your system, which might cause trouble later on.

Many tools are made for scanning for leftovers after the standard uninstall. It also offers features to remove remnants of already uninstalled programs, if necessary.

4. Reset your passphrase

This will clear the synced data from Google’s service. However, the synced data will remain on your PC and be used to sync with other devices. Once done, check if the Chrome history not syncing problem is fixed.

If the Chrome profile is not syncing, try this method to get things up and running. If it doesn’t work, head to the next one.

6. Disable and enable sync on a different PC

After doing that, switch back to your main PC and check if the Chrome not syncing open tabs problem is resolved.

If you have the same sync problem with Google Drive, be sure to check our guide to solve the issue quickly.

 7. Log out of Chrome on all devices

After signing out on all devices, sign in to just two devices and check if syncing works. If it does, you can slowly sign back into other devices as well. This should fix the Chrome not syncing passwords problem.

 8. Clear cache

After doing that, your cache and temporary files will be removed and the sync should start working again. If not, be sure to remove these on all synced devices. This would fix the Chrome not syncing extensions problem.

Also, make sure to check that you have Bookmarks enabled under syncing. If nothing else works, installing the latest version of Google Chrome would help, in case you haven’t updated the browser in a while.

Also, find out what to do if Chrome is not loading pages properly.

Was this page helpful?


How To Fix The No Sound Issue In Ubuntu

An issue often faced by Ubuntu users after installing Ubuntu or upgrading to a new version is the sound problem, or more specifically, the “no-sound” problem. This can happen for a variety of reasons. Sometimes it is related to a misconfiguration in the speaker settings, or maybe your hardware is not well-supported.

For most people, it’s usually a pretty easy problem to resolve. This is because most problems stem from an issue with services running on the system. In this article we go through a few simple fixes you can try. You don’t necessarily have to try them all. Just start at the top of the list and work your way down.

Install Volume Control for PulseAudio

PulseAudio is a default sound service for Ubuntu as well as a few others. It’s open source and generally reliable, working with ALSA and OSS drivers to make sure the sound signals your system generates get passed on to your speakers.

But while applications and desktop environments come with their own volume controls for PulseAudio, it’s not that granular and doesn’t let you control each playback stream individually. Pavucontrol gives you more control over each audio device on your PC, so you can play around with those sliders to make sure that your speaker or headphone volume is set to what it should be, for instance.

To install pavucontrol, open the Terminal and enter the following commands:







After that, run pavucontrol either from the terminal or looking up “PulseAudio Volume Control” in your desktop environment’s launch menu. Go to the “Output Devices” tab and make sure your default speakers are selected.

Check Your Speaker Settings

When experiencing sound issues on your Ubuntu machine, you first need to is check out your headphones and speakers for connection problems. It could be that a audio cable is connected to the wrong port or not connected at all.

If you’re using a Bluetooth device, check to see if it’s paired correctly. Don’t forget to take a look at the volume controls of your devices to make sure they’re at acceptable levels. You should also verify that the output volume is not muted on your computer and that the correct output device is selected.

Check the ALSA Mixer

Under the hood PulseAudio uses ALSA, a kernel module that directly controls your sound devices. If you need more fine-grained control over your ALSA-level volume, follow the steps below:

Open the terminal.

Type alsamixer and press the Enter key. You will see the following output in your terminal.

Select your correct sound card by pressing F6. For me, the defaults work just fine, but feel free to try other options if it doesn’t work.

Use the left arrow and right arrow keys to select a volume control. The currently selected item is shown in red at the bottom.

Use the up arrow and down arrow keys to increase and decrease volume levels for each control.

When a mixer control is muted, “MM” appears below the volume bar. Note that a bar can be 100% full but still be muted, so do check for this. You can unmute a control by pressing the m key. This changes “MM” to “OO.”

To exit alsamixer, press the Esc key.

Note: when you mute or unmute a control, pulseaudio may pick it up and mute and unmute other controls as well. Make sure to confirm that the relevant controls as well as the master control are unmuted before exiting.

Reload ALSA

Another thing you can try if the sound issue persists is to reload ALSA. To do that, use the following command in the terminal:


alsa force-reload

The output looks like the following image.

Once it’s done, if you still have trouble getting the sound working, try






You may have trouble after reloading ALSA if pulseaudio does not register that the modules were reloaded.

If you’re still not getting audio, try this one-shot ALSA command directly:

alsactl restore Reinstall ALSA and PulseAudio

If the above methods did not fix your issue, try reinstalling ALSA and PulseAudio in the following manner. Open your terminal and enter the following commands:





alsa-base pulseaudio




alsa-base pulseaudio

Reload ALSA again and reboot your computer.

Advanced Troubleshooting Your Output Might Trigger ALSA but Not PulseAudio

Ultimately, if PulseAudio mutes an output, it doesn’t matter what ALSA says. The sound coming out to your devices will be processed through ALSA but won’t be served to them through PulseAudio.

To get around this, we need to force ALSA to talk to PulseAudio when the master volume shifts to ensure that the latter follows along.



pulse sset Master toggle

Devices whose volume can only interact with ALSA for some odd reason will also interact with PulseAudio.

Are You Sure It’s Not Just One Application?

A misbehaving application can cause more problems than you think in ways that would surprise you. It may even be an application you didn’t open!

To have a look at everything using your audio control, type:

pacmd list-sink-inputs

If you want to be more surgical about it, type:

You might have had volume in the application and it could still be muted or on zero volume!

To fix a muted application, type (replace application_index with the index number you found in “index:”):

pacmd set-sink-input-mute application_index


To fix applications with unusually low volume, type:

pacmd set-sink-input-volume application_index 0x10000 No Audio When Resuming After Suspend/Sleep

Sometimes PulseAudio just isn’t in the mood to wake up with the rest of your computer. In this case, running






brings your audio back from the dead, but don’t get too excited. This will not survive another reboot or suspend/sleep. Carefully follow this mini-guide to make the problem go away permanently:

In the terminal, type













to create a systemd service manager file.

Open the file for editing:











Paste (Ctrl + Shift + V for terminal paste) this into it:





=Fix PulseAudio after resume from































Press Ctrl + X to exit and Y in the prompt asking you whether you want to save the modified buffer.

Type the following to register this as a systemd service.







Remember to replace your_username with the appropriate value.

Are You Running Timidity?

To get timidity to run properly, start by adding it to autostart (sometimes called Startup Applications in desktop environments like GNOME) and modifying the command that runs the application to be:




Taking things a little further, type the following to add root to the pulse-access group





pulse-access root

Once you reboot, your audio should work fine. If it still fails, the only other solution within reach is to remove timidity from Ubuntu.

Now you’ll have a service that’s meant to run only when you resume after suspend, immediately shutting down once it’s done its job to avoid adding bloat.

Frequently Asked Questions 1. Can I remove ALSA and keep PulseAudio?

Tread very carefully here! PulseAudio needs a kernel-level audio module to work. If you’re planning on replacing ALSA with something else that operates in the kernel (like Open Sound System), then by all means, go ahead and do that. The process is a bit more complex than replacing a Realtek kernel module for networking, so be aware that you may be sitting for a very long time trying to sort out issues.

2. Does PulseAudio have alternatives?

Yes! The most popular (and most viable, if you plan on using a desktop) alternative to PulseAudio is PipeWire. It contains better integrated support for Bluetooth devices and improves PulseAudio’s wonky way of handling sampling and post-processing. Many distributions now make it available in official repositories, and its stability has improved significantly in recent years.

If you want a more professional setup with your audio, however, you may want to opt for something like JACK.

3. Can I run PulseAudio alongside other services?

While some services have libraries and setup options in place to get PulseAudio working with them, it’s highly recommended that you stick to one service on your system at a time. Most services will simply compete with PulseAudio for your system’s applications, and it can cause unpredictable behavior. Others will simply not work at all without getting rid of PulseAudio entirely. (PipeWire uses the pipewire-pulse service, which replaces pulseaudio.)

Miguel Leiva-Gomez

Miguel has been a business growth and technology expert for more than a decade and has written software for even longer. From his little castle in Romania, he presents cold and analytical perspectives to things that affect the tech world.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.

By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time.

Update the detailed information about Microsoft Account Locked For No Reason / Violating Terms: Fix on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!