ubc-nlp / afrolid Goto Github PK
View Code? Open in Web Editor NEWAfroLID, a powerful neural toolkit for African languages identification which covers 517 African languages.
Home Page: https://demos.dlnlp.ai/afrolid/
License: Apache License 2.0
AfroLID, a powerful neural toolkit for African languages identification which covers 517 African languages.
Home Page: https://demos.dlnlp.ai/afrolid/
License: Apache License 2.0
Hi, I get this error when I try to run the AfroLID code that integrates it with pandas. When I troubleshoot they say the main reason could be data type incompatibility between the input and output data, but I've made sure the input data is a string type. Could it be because AfroLID doesn't recognise the language being input? I'm using South African tweets that are sometimes a mix of English and other local languages. Although, I also get the same error when working with purely Swahili tweets. Please help.
Integrate AfroLID with Python code
import pandas as pd
from tqdm import tqdm
tqdm.pandas()
df = pd.read_csv(filename)
def get_afrolid_prediction(text):
predictions = cl.classify(text, max_outputs=1)
for lang in predictions:
return lang, predictions[lang]['score'], predictions[lang]['name'], predictions[lang]['script']
df['predict_iso'], df['predict_score'], df['predict_name'], df['predict_script'] = zip(*df['Text'].progress_apply(get_afrolid_prediction))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.