Skip to content

Issue with the Dialect Identification Module #165

@hend-elghazaly

Description

@hend-elghazaly

Salam :)

I am trying to use the dialect identification module (camel_tools.dialectid) but I get the following error: sklearn.exceptions.NotFittedError: idf vector is not fitted.

This error is generated when I run the example code provided in the documentation:

from camel_tools.dialectid import DialectIdentifier

did = DialectIdentifier.pretrained()

sentences = [
    'مال الهوى و مالي شكون اللي جابني ليك  ما كنت انايا ف حالي بلاو قلبي يانا بيك',
    'بدي دوب قلي قلي بجنون بحبك انا مجنون ما بنسى حبك يوم'
]

predictions = did.predict(sentences)

top_dialects = [p.top for p in predictions]

I installed camel-tools and the data (camel_data -i all), I am currently using python version 3.11.7 and scikit-learn
version 1.2.2.

Is there anything I need to do to use the dialect identification module?

Thank you for all your efforts!

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions