Page 5 of 5
A folder structure makes it easy to navigate and understand any project. On Xcode, we can build the project structure using groups. The problem with this is that it doesn’t reflect on the filesystem. What this means is that if we are looking at the code on the filesystem, or on Github, we won’t have the benefit of the project structure. In this post, I’ll explain how to share the project structure on the filesystem and on Xcode.
Read More...
The Natural Language framework, introduced by Apple in 2018, provides tools for developers to process and analyse text. The framework provides the following capabilities:
- Identification of language and scripts
- Tokenization
- Tagging
- Lemmatization
- Name/entity recognition
I’m interested in Tibetan texts processing, so let us see how can we use this framework for Tibetan Text processing.
Language and script identification
Identifying language and script is a simple matter of providing some text and asking the Natural Language framework (NL from now on) to identify the language. We can do this in two different ways; one is straight forward using NLLanguageRecognizer, the second one is using NLTagger setting up the tagScheme to obtain the language. The following code uses NLLanguageRecognizer:
Read More...
The International Components for UnicodeICU provides powerful libraries for working with Unicode. In this post, I’ll explain the basics of how to use ICU transforms in Swift. There are many areas to explore in ICU and Swift, but we will focus on using the transforms defined in ICU User Guide. There is currently no support for arbitrary ICU transforms, but the basics are handy.
In a future post I will discuss the use of Unicode properties, in Swift 5 we will get Unicode properties added to Unicode.Scalar and that will give us access to more ways to get information on what our Strings represent and create software that handles better the use of different scripts and languages. But for now, let’s focus on ICU transforms.
Read More...
Each app in iOS has only one UIApplication object in charge of managing the app when your app changes state in its life cycle(e.g. activate, suspend, send to background, reactivate, etc.) it notifies it’s AppDelegate so it can run any task required by that change in state. In simple terms, the AppDelegate is in charge of ensuring that your app state changes are handled correctly, that the app is ready for each state change and will end up in a valid state when the event takes place.
Read More...
With the release of SourceKit-LSP we can run an LSP server for the Swift programming language. That means that we can take advantage of autocompletion and jump to the definition in our text editors that support connection to an LSP server. I’ll show how to set this up using Vim 8.
LAST UPDATED: September/25/2019
First install SourceKit-LSP
Clone the source from the SourceKit-LSP repository
Read More...