Name: Saurabh Jamadagni
GitHub: https://github.com/SaurabhJamadagni
College: Indian Institute of Information Technology, Pune
Major: Bachelors in Electronics and Communication Engineering
Country: India
Timezone: IST (UTC+5:30)
Working Hours: 11:00 to 21:00 IST
Mentor: @AndrewTavis
About me
I am currently a junior in college from India. I love building native applications and wish to explore the extent of mobile computation. In my free time I play badminton and am part of my college team. I am also fond of painting and lately also love reading up on software architecture principles.
Technical Knowledge
My university coursework has allowed me hands-on experience with various concepts of computer science. These include algorithm design, object-oriented programming, database management systems, network theory and various programming languages such as C/C++, Java and Python.
Apart from my formal learnings, my projects have allowed me to explore various frameworks and APIs provided by Apple such as UIKit, SwiftUI, CoreData, Combine and ARKit. I also have experience with using serverless application services like Firebase and the open-source alternative Appwrite. I also have a strong understanding of version control through git and GitHub.
Experiences with Scribe
I started contributing to Scribe-iOS in the later half of June 2022. My first contribution involved resetting the verb conjugation base state for all languages in the keyboard. I have been a consistent contributor to the Scribe-iOS codebase since then, working on minor bugs to major feature additions like auto-complete.
I also participated in the Wikimania hackathon as a contributor to scribe where I was able to brainstorm with the project owner (Andrew) about possible solutions to the tasks decided for the hackathon. I have an understanding of the Scribe’s design language and I would thus be a great candidate to be the contributor to this project for GSoC 2023.
Microtasks completed during the application period
- Dark mode responsiveness in app screen
- This required generation of some image assets and creating new color and image sets that were dynamic.
- This issue was in preparation to creating a more advanced and full-fledged menu for the application (which is the scope of this GSoC project)
- Emoji Autosuggest
- Added new buttons to the storyboard file. These hold the two best emoji suggestions for the last typed word from the emoji_suggestions JSON file.
- Included hiding the third autosuggestion key whenever emojis needed to be displayed.
Benefits to the community
I am fascinated by the work the Wikimedia foundation does. By working on this project I will be able to contribute in bringing more languages to Scribe using the abundant Wikidata data stores. The GSoC visibility can help Scribe and Wikidata reach more linguistic communities while further showing the potential of Wikidata as a communal data source. The work I would be doing during GSoC would also benefit Wikidata and broader Wikimedia communities by improving one of the strongest uses of Wikidata in mobile applications.
Deliverables
General
- Show timely and consistent work throughout.
- Document changes and the reasons behind them.
- Create GitHub issues to establish project management workflows.
- Communicate GSoC milestones via Phabricator and other means.
Before Mid-term Evaluation
- Have a working Menu for the application.
- Perform user testing on the menu to fix bugs and improve flows.
- Setup Scribe-Data project and environment locally.
- Have regular check-ins with the project mentor to update the status.
Before Final Evaluation
- Add language data for all the languages discussed with the mentor.
- Test out keyboard commands to test for edge cases.
- Ensure proper commit messages and well commented code to streamline PR reviews.
Technical proposal
My approach to the project deliverables is two-folds.
1. Menu for the Scribe Application
The Scribe application is written using the Swift language and uses the UIKit framework. As you can see in the image attached below, currently the Scribe application only displays the installation guide and a link to the open-source repository.
The design for the menu as seen in the Figma file suggests the creation of multiple different screens that navigate to the following sections:
- Installation (the current app home screen)
- Scribe Settings
- App languages
- Language specific settings
- App languages
- About
- About Wikimedia, Wikidata and Scribe
- Privacy policy
- Further options to connect with the development community
The Views will be built using the Storyboard interface. For example,
We can also build the screens out programmatically as storyboards are notorious for merge conflicts. This is done by adding each component to the subview through a function that is called inside the viewDidLoad method.
This will require creating new ViewControllers for the different sections and establishing navigation flows between them. We can assume a simple navigation stack where the bottom most layer is the main ViewController. This is achieved using a NavigationController on the first view that is presented.
The color scheme for the components can be found in the figma file as well as the assets file of the applications. Any changes are open to discussion based on the project mentor’s guidance.
2. Adding more languages to the keyboard
The data used by Scribe-iOS is generated and processed in the Scribe-Data project repository.
Wikidata Query service uses the SPARQL language to query data. It will be used to filter the vast stores of Wikidata and download the language and word type related data that's needed — for example, German nouns, French verbs, etc. Thus, in our case we would need a .sparql script to download data for nouns for Norwegian, a language that Scribe intends to add.
The output of these scripts will be JSON files for the particular word-type for that language. These JSONs are of a certain format and contain data as an array of arrays. For example, here’s a snapshot of the generated German nouns json.
The string of characters that follows the key ‘gender’ are QIDs (a unique identifier of a data item on Wikidata) for the gender type of the particular singular word. If we search wikidata for the QID = Q499327, we see that it denotes the masculine gender.
Similar data will be required to be downloaded for all word-types of all new languages that need to be added.
Each language requires a python script to clean up and process the data. Processing can include changing the format of the JSON to be more suitable to be used within Scribe, decoding gender types using the QIDs to be gender abbreviations such as M/F/N/PL and using machine learning to translate words queried from Wikidata. The flat organization of the downloaded JSON needs to be further broken down into an array of key-value pairs where the key is the word itself.
Consider an example word ‘Wissenschaft’ (Science in German).
Before processing:
{
"singular": "Wissenschaft",
"gender": "Q1775415",
"plural": "Wissenschaften"
}After processing:
"Wissenschaft": {
"plural": "Wissenschaften",
"form": "F"
}The python scripts are fairly standard but need to be altered to include certain specificities of every different language. The script also arranges the new JSON in an alphabetical order on the basis of the dictionary keys. These files are then used in the Scribe-iOS application as language data.
The following file structure is generally observed when adding any new language in the Keyboards/LanguageKeyboards directory.
Language |- Data (the processed JSON files as data) : |- nouns.json : |- prepositions.json : |- … : |- etc. |- LanguageCommandVariables.swift |- LanguageInterfaceVariables.swift |- LanguageKeyboardViewController.swift
Interface variables file is where the keys for the keyboard are defined, what the spacebar is called in the given language and any other required initializations. This includes the key layout for the language keyboard, the default autosuggestions when the textfield is empty, translations for the command keys (translate, conjugate and plural), etc.
The Command Variable file is used for declaring command related data for that particular language. This includes conjugation states, setting the conjugation labels, declension state, etc.
The KeyboardViewController file is used to declare the view controller class which inherits from the general view controller file that we create. This file is what presents the actual keyboard when a user switches from their system keyboard.
Timeline
Community Bonding:
Getting acquainted with the code base of Scribe-Org and understanding how various repositories work together beyond Scribe-iOS. Checking in with mentors and contributors to create a plan for GSoC including MVP, medium and long term goals as well as a work schedule that includes check ins and documentation of my work. Discussing with the project mentor the general skeleton of adding a new language to the keyboard. Setup the environment to work with Scribe-Data including extensions for code formatting and virtual environment use.
Week 1:
Explore the Scribe-iOS codebase followed by Scribe-Data to gain a holistic understanding. Touch up on concepts of UIKit as it is the primary framework associated with the app. Discuss design ideas for the Scribe app menu that needs to be implemented. Separate the menu into different screens through Storyboards.
Week 2-4:
Make required UI components programmatically based on the design file discussed earlier. Understand the general flow of navigation and create a Menu for the application. User testing the new interface to make sure assumptions made are valid and a good UX is observed. This can be potentially done by having beta users through Testflight, Apple’s pre-release API for the App Store.
Week 5:
Understanding Wikidata Query Service and its intricacies. Look into the python scripts in Scribe-Data to understand data organization and processing. Create copies of formatting scripts for each language and plan how to change them for the new languages.
Week 6-10:
Generate data for Norwegian (Bokmål), Danish and English keyboards and process it using Wikidata Query Service and Python. Create required files to store language JSONs in the Xcode project. Assign required variables in the respective Interface variables file. Make sure language cases work with UI in conjugate table mode.
Week 11:
Testing different language keyboards. Test out different commands for each language, identify and fix bugs.
Week 12-13:
Spare weeks for additional work that might be required or in case of any delays due to some unforeseen emergencies.
Extras:
Currently, the translate feature of Scribe only works between English and the keyboard language (Ex: DE->EN, RU->EN, etc). I would like to implement a feature that allows the translation functionality between any combination of the keyboard languages (Ex: DE->RU, EN->RU). If extra time remains, I would like to work on this feature with the project mentor’s go-ahead.
Potential Personal Takeaways
My experience in contributing to Scribe is limited to the Scribe-iOS repository. Through this project I will be able to gain a more holistic understanding of the organization. This would allow me to work with Scribe-Data and understand in-depth how the data that the application uses is being fetched.
This would be a wonderful opportunity for me to practice and learn different project management skills including working with design files in Figma. I would also gain hands-on experience of working with Wikidata Query Service and other online APIs. This would allow me to interact with abundant data down the line in any personal projects that may follow. It would also ingrain in me good practices that come with working in an accountable environment. Meeting more open-source peers would also bring networking opportunities and a larger learning landscape.


