De confuse is a java librabry which convert confusable unicode characters(similar looking character) or string to english alphabets/strings.
- For gradle: add following to your
build.gradle
file.
implementation 'io.github.projectclean:deconfuse-0.1.1'
- For Maven: add the following to your
pom.xml
file.
<dependency>
<groupId>io.github.projectclean</groupId>
<artifactId>deconfuse</artifactId>
<version>0.1.1</version>
</dependency>
import io.github.projectclean.deconfuse.core.DeConfuse;
import io.github.projectclean.deconfuse.core.DeConfuseFactory;
import io.github.projectclean.deconfuse.enums.Language;
class Test {
public static void main(String[] args) {
String s = "ƉͤĆоɳſŪȘȄ";
DeConfuse deConfuse = DeConfuseFactory.createDeConfuse(Language.ENGLISH);
System.out.println(deConfuse.deConfuseString(s));
}
}
/*
* Output:
* deconfuse
*/
curl --location --request POST 'https://kumarpushpam.com/api/v1/deconfuse/' \
--header 'Content-Type: application/json' \
--data-raw '{
"str": "ƉͤĆоɳſŪȘȄ"
}'
{
"deConfusedString": "deconfuse"
}