A site devoted mostly to everything related to Information Technology under the sun - among other things.

Monday, December 2, 2024

Using Arabic Calligraphy in CAPTCHA Schemes


Subject Matter & Problem

Nowadays, many daily human activities such as education, trade, talks, etc. are done by using the Internet. In such things as registration on Internet web sites, making comments, and other such activities, hackers could develop programs that automatically register fictitious or fraudulent users, add SPAM by abusing comments feature and thus interfere with the proper functioning of publicly available Internet Web sites. 

A common approach has been the deployment of CAPTCHA on Web screens that require human interactivity.  A CAPTCHA is a type of challenge-response test used in computing as an attempt to ensure that the response is generated by a human being. The process usually involves a computer asking a user to complete a simple test which the computer is able to grade. These tests are designed to be easy for a computer to generate but difficult for a computer to solve, but again easy for a human. If a correct solution is received, it can be presumed to have been entered by a human.

A common type of CAPTCHA requires the user to type letters and/or digits from a distorted image that appears on the screen. Such tests are commonly used to prevent unwanted internet bots from accessing websites, since a normal human can easily read a CAPTCHA, while the bot cannot process the image letters and therefore, cannot answer properly, or at all.

The aim of this idea is the development of CAPTCAH for the users familiar with the Arabic alphabet and scripts, using Arabic calligraphic styles in languages such as Arabic, Kurdish, Pashtu, Persian, and Urdu languages.

Solution

The gist of this solution is to use the calligraphic styles of Arabic script in a dual text CAPTCHA scheme.

Arabic calligraphy, also known as Islamic calligraphy, is the artistic practice of handwriting, or calligraphy in the lands sharing a common Islamic cultural heritage.  Broadly speaking, there are 2 styles of writing in Arabic Script: Geometric Scripts and Cursive Scripts.  They are enumerated on the sections below together with sample writings of each.

 This naturally leads one to propose a dual CPATCHA scheme; with one displaying geometric style scripts while the other one containing a cursive style text.  This gives the possibility of creating 2 X 12 = 24 distinct pairs of CAPTCHA based on Arabic calligraphic styles.

In order to supply the text for each of these 2 CAPTCHA boxes, this idea relies on the methods and techniques of the references 1 & 2 for the following purposes:

The algorithms for distinguishing Arabic/Kurdish/Persian/Pashtu/Urdu language users from computer programs is based on Arabic calligraphic styles of text.  The initial algorithm, discussed in reference 1, is based on adding a background to the image of a meaningless randomly generated Arabic/Kurdish/Pashtu/Persian/Urdu word. This method relies on the difficulty of automatic separation of background from Arabic script text, due to the presence of many diacritical dots and signs. Furthermore, in this method, the image of a random meaningless Arabic/Kurdish/Pashtu/Persian/Urdu text is shown to the user, and he is asked to type it.   This algorithm is modified so that the Arabic text is now written in a particular (Arabic) calligraphic style.

 Furthermore, this idea relies on and extends the approach of reference 2 for the generation of CAPTCHA test.  In that reference, instead of using a large database of prepared word images written in Nastaliq calligraphic style, each time a random meaningless Arabic/Kurdish/Pashtu/Persian/Urdu word is generated and shown to the user. Therefore, there is not a need to make a local database for images.  This reduces the possibility of the text being recorded and over time the database constructed by hackers through a process of massive search.  In this disclosure, the above method is extended so that the CAPTCHA word is in generated with a specific calligraphic style.

 This idea uses algorithms and techniques similar to those found in reference 3 for the generation of CAPTCHA text.  The algorithms are altered and extended to include Arabic calligraphic styles. 

(It should be noted that Arabic calligraphic style is not identical with a font.  There can be multiple fonts within the same Arabic calligraphic style.  For example, the German Gothic script and the modern German scripts are not just distinguished by 2 different fonts; rather they are different calligraphic styles within the Latin script.)

Considering that the presently available OCR programs cannot identify these Arabic/Kurdish/Persian/Pashtu/Urdu words, the word can be identified only by a user familiar with Arabic script as well as with the specific Arabic calligraphic styles.

Geometric scripts (basically Kufic styles)

Kufic is a cleaner, more geometric style, with a very visible rhythm and a stress on horizontal lines. Vowels are sometimes noted as red dots; consonants are distinguished with small dashes to make the texts more readable.

 


and


The Maghribi script and its Andalusi variant are less rigid versions of Kufic, with more curves.



In "Flowering Kufi", slender geometric lettering is associated with stylized vegetal elements. In "Geometric Kufi", the letters are arranged in complex, two-dimensional geometric patterns, for example filling a square. This aims at decoration rather than readability.



Cursive styles (basically Naskh styles)

The cursive script styles are:

1.       Naskh is a simple cursive writing that was used in correspondence before the calligraphers started   using it for Qur'an writing. It is slender and supple, without any particular emphasis, and highly   readable. It remains among the most widespread styles. The most famous calligrapher of this genre   was  Hâfiz Osman, an Ottoman calligrapher who lived during the 17th century. It is the basis of     modern   Arabic print.



2.       Ṯuluṯ is a more monumental and energetic writing style, with elongated verticals.



3.       Tawqīʿ appeared under the Abbassid caliphate, when it was used to sign official acts. With elongated verticals and wide curves under the writing line, it remained a little-used script.


and



4.       Riqaa' was a miniature version of tawqi'. It has nothing to do with ruq`ah, a much later style the   Ottomans developed for secular handwriting, and which is still used at the present day in the Arab   countries that fell within the Ottoman cultural sphere.



5.       Muḥaqqaq is an ample, alert script. Letter endings are elongated, and their curves underline the text.



6.       Rayḥānī – which is a miniature version of Muḥaqqaq.




7.       Nasta'liq is a cursive style that means "suspended", which is a good description of the way each letter   in a word is suspended from the previous one, i.e. lower rather than on the same level.



8.       Shikasteh Nasta'liq (Broken Nasta'liq) is a variant of Nasta'liq  used in Persian script and in more   informal contexts.



9.       Diwani script is a cursive style of Arabic calligraphy that is distinguished by the complexity of the line   within the letter and the close juxtaposition of the letters within the word.


and



 Bihari script (used in India during the 15-th century)



11   Ruq'ah (also known as Riq'a) which is the most common script for everyday use is Simple and easy to   write, its movements are small, without much amplitude.




12   In China, a calligraphic form called Sini has been developed. This form has evident influences from   Chinese calligraphy, using a horsehair brush instead of the standard reed pen



Use Case 1 – Normal User

The user navigates to a Web page that requires validation.  The Arabic Calligraphic CAPTCHA Scheme will work with the Web server and display a dual Arabic text strings to the user.  Each CAPTCHA box will display a randomly generated text based on Arabic script but in a different calligraphic style.  The background of each CAPTCHA will also be different from each other.

 

The user, based on his knowledge and familiarity with Arabic script as well Arabic Calligraphic styles will type the CAPTCHA texts in a text box.  If correct, the system will validate/authenticate the user and the user will proceed with his tasks.  If incorrect, the system will provide the user with another set of CAPTCHA.

Use Case 2 – Administrative User

The system will be equipped with an administrative interface and features.  These administrative features will enable the administrator to perform the following tasks:

 

1.       Add a new font to a style

2.       Remove font from a style

3.       Set the background of the CAPTCHA

4.       Set the length of the CAPTCAH text

5.       Set the size, color of the font for specific style to be used or displayed

6.       Specialize the Arabic script to those of Arabic, Pashtu, Persian, or Urdu

7.       Set the Arabic calligraphic styles of the dual CAPTCHA scheme – including the ability of fixing the styles or making their choices random.

Other Similar Solutions

This idea is based on prior work sited below:

1.       Mohammad Hassan Shirali-Shahreza, Mohammad Shirali-Shahreza: Persian/Arabic Baffletext CAPTCHA. Journal of Universal Computer Science, vol. 12, no. 12 (2006), 1783-1796. (see http://www.jucs.org/jucs_12_12/persian_arabic_baffletext_captcha/jucs_12_12_1783_1796_shahreza.pdf )

2.       M. H. Shirali-Shahreza and M. Shirali-Shahreza: Advanced Nastaliq CAPTCHA. Cybernetic Intelligent Systems, 2008. CIS 2008. 7th IEEE International Conference on 9-10 Sept. 2008. (see http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=4798962&url=http%3A%2F%2Fieeexplore.ieee.org%2Fiel5%2F4786971%2F4798915%2F04798962.pdf%3Farnumber%3D4798962 )

3.       Bilal Khan, Khaled Alghathbar, Muhammad Khurram Khan, Abdullah M. AlKelabi, Abdulaziz AlAjaji: Cyber security using Arabic CAPTCHA scheme. Int. Arab J. Inf. Technol. 10(1): 76-84 (2013) (see http://www.iajit.org/PDF/vol.10,no.1/3046-1.pdf )

The  idea extends the above works through the application of the Arabic calligraphic styles to the CAPTCHA scheme. 

The various styles may be realized in specific fonts designed for that style.  Within each Arabic calligraphic styles, there could be numerous fonts that conform to the stylistic rules of that style. 

System Architecture & Design

The architecturally significant components of the system are illustrated below:

 


 

Possible Modifications

This scheme may be extended to other Arabic calligraphic artifacts for use in a CAPTCHA scheme:

 

1.       Bismillah Calligraphy

 


2.       Tuqrah



3.       Zoomorphic Calligraphy

 



Applying MBTI to UI/UX Design

Summary 

The main idea here is to build a system that customizes an existing UI/UX via style transfer AI, per user preferences as well as by incorporating the Myers-Briggs Type Identifier of its user.  This is to be accomplished via the application of Artificial Neural Networks (ANN), specifically Generative Adversarial Networks (GAN) and Convolutional Neural Networks (CNN) as well as Expert Systems.

There are two parts to this proposed system.  The first one is the application of ANN, GAN & CNN models to an existing web site, application screen, and other Human Machine Interfaces for s tyle transfer.  The other is the training of these ANN, GAN & CNN models for each of the 16 MBTI types.

Training sets of data are used to train GAN/CNN models to create artwork, images, color schema, fonts, music etc. from pre-existing such items in a manner that conform to each individual MBTI type’s preferences.  The training data is created from published research as well as from the results of conducting workshops and performing psychometric measurements. 

These Neural Network models are deployed in an execution environment and are made available to other processes.  There is one such model for each asset type and 16 MBTI types.  That is, for the MBTI type INTJ, there is a model for music, a model for artwork, and other such media.  The customization of color and text properties is achieved via an Expert System for specific MBTI type.

The MBTI Transformation Services receives a MBTI type identifier from the calling process.  (The MBTI may be furnished by the user of the system or may be inferred through some other means – that is not part of this disclosure).  It selects the corresponding sets of models for that MBTI types, using those models to transform the assets of that UI.  It does so by pulling those assets for that UI and inputting them into the corresponding AGN/CNN model.  The MBTI Transformation Services is deployed in a data center and is made accessible to calling processes and clients via a suitable application programming interface such a Web API, SOAP, RPC, or other such protocols.

The result is a UI in which the text attributes (such as font), color scheme, artworks etc. have been altered from their original state to conform to preferences of specific MBTI type.

System Diagram 

MBTI & Colors



and



MBTI & Artistic Styles


ISTJ: exact details, like to draw architecture/shapes/etc., appreciate other people’s art rather than creating their own, don’t mind being given structure/instruction in art (ex: art class), create for the result.


ISFJ: exact details, emotion-based art, don’t mind being given structure/instruction in art (ex: art class), create for the result, like traditional types of art.


INTJ: see drawing as an almost intellectual pursuit to overcome, want to portray them accurately and master the act of art, don’t mind being given structure/instruction in art (ex: art class), idealistic art (can show their logical visions for the future).


INFJ: perfectionist in art, emotion-based art, like art that reflects human relationships/emotions/dreams/etc., see art as a form of connecting/communicating something to other people, create for the process, imaginative/abstract art, don’t mind being given structure/instruction in art (ex: art class).


ISTP: exact details, likes to create so generally good at art, don’t like being told how/when/what to draw or being given deadlines, creates art of the here and now.


ISFP: exact details, emotion-based art, known as the “artist”—generally in the arts, don’t like being told how/when/what to draw or being given deadlines, Paul Gauguin, creates art of the here and now.

 
INTP: see drawing as an almost intellectual pursuit to overcome, want to portray them accurately and master the act of art, don’t like being told how/when/what to draw or being given deadlines, idealistic art (can show their logical visions for the future).


INFP: emotion-based art, imaginative/abstract art, don’t like being told how/when/what to draw or being given deadlines.

 
ESTP: can become easily frustrated with art (need to balance it with other physical pursuits or find art that is more physical based), don’t like being told how/when/what to draw or being given deadlines, creates art of the here and now.


ESFP: exact details, emotion-based art, like when art brings them attention, like bright colors, Picasso, don’t like being told how/when/what to draw or being given deadlines, creates art of the here and now


ENTP: like to portray mental designs onto paper, use other art to base their art of, Leonardo DaVinci, don’t like being told how/when/what to draw or being given deadlines, idealistic art (can show their logical visions for the future).


ENFP: doesn’t always finish art pieces, instead creating a string of sketches and ideas until they find one that they particularly like, emotion-based art, imaginative/abstract art, don’t like being told how/when/what to draw or being given deadlines.


ESTJ: exact details, don’t mind being given structure/instruction in art (ex: art class), create for the result.


ESFJ: exact details, emotion-based art, don’t mind being given structure/instruction in art (ex: art class), create for the result.


ENTJ: don’t mind being given structure/instruction in art (ex: art class), idealistic art (can show their logical visions for the future).


ENFJ: soft, often will depict people (especially their expressions), emotion-based art, imaginative/abstract art, don’t mind being given structure/instruction in art (ex: art class), appreciate art history to provide historical/social context for pictures.


MBTI & Interior Decorating




Novelty & non-obviousness

The novelty of the system is in the automated processing of an existing UI/UX to conform to the preferred styles of different MBTI types.  The assets of the user interface, such as text attributes, images, color schema, themes, videos, audio files are altered to conform to those preferences.  This is accomplished by using Generative Adversarial Networks (GAN) and Convolutional Neural Networks (CNN) and related Artificial Intelligence techniques such as Expert Systems as well by using such programming techniques as Markup/Declarative programming languages and Programming Frameworks.  GAN, CNN, and other such models are developed and trained on basis of training data sets that relates each of the 16 MBTI.  Such programming tools (meant here only as an example) as Dynamic HTML, Style Sheets, JavaScript Frameworks are then used to update the initial web page with these modified assets.

Benefits & limitations

This system is intended to offer customized User Interface/User Experience (UI/UX) to customers.  That is accomplished by enabling alterations to the themes, layout, colors, content, modalities, and other features of UI/UX based on the Myers and Briggs Type Identifier (MBTI of the consumers.

It is well-known that people belonging to one of the 16 different psychometric MBTI types exhibit different preferences in their learning styles, in their communication styles, as well as in their artistic and color preferences.  This system is aimed to automatically customize an existing UI/UX for different MBTI types. The underlying style transfer can additionally be divorced from the MBTI types and used as an in-general style transfer process for user preferences.

This is meant as an addition to and an enhancement of the usual practice in UX/UI design of a persona; a fictional character that represents a typical user of an app, website, or other product.

References

MBTI Foundation:

The Myers & Briggs Foundation - The 16 MBTI® Types (myersbriggs.org)

Predicting Myers-Briggs Type Indicator with Text Classification:

6839354.pdf (stanford.edu)

Creative Tools to Generate AI Art:

Top 41 AI Art Generators: Make AI Art, Paintings & More (2021 GUIDE) — AIArtists.org

Neural Style Transfer: Creating Art with Deep Learning using tf.keras and eager execution:

Neural Style Transfer: Creating Art with Deep Learning using tf.keras and eager execution — The TensorFlow Blog

Writing a music album with Deep Learning:

Writing a music album with Deep Learning | by Nicolás Schmidt | Towards Data Science

Music Style Transfer with Deep Learning Method

Music Style Transfer with Deep Learning Method | by Rex Zhou | Medium

Expert Systems:

https://en.wikipedia.org/wiki/Expert_system

About Me

My photo
I had been a senior software developer working for HP and GM. I am interested in intelligent and scientific computing. I am passionate about computers as enablers for human imagination. The contents of this site are not in any way, shape, or form endorsed, approved, or otherwise authorized by HP, its subsidiaries, or its officers and shareholders.

Blog Archive