Swift framework for document classification using a Core ML model.

Overview

DocumentClassifier

CocoaPods Version Swift Platform

Overview

DocumentClassifier is a Swift framework for classifying documents into one of five categories (Business, Entertainment, Politics, Sports, and Technology). It uses a CoreML model trained with 1,500 news articles from the BBC.

Features

  • iOS 11.0+, macOS 10.13+, tvOS 11.0+, watchOS 4.0+
  • 100% Test Coverage
  • Best CV Score: 0.965333333333

Usage

Swift 4 Released (Sample Article)

let text = articleText
guard let classification = classifier.classify(text) else { return }
print(classification.prediction) // Technology: 0.42115752953489294
print(classification.allResults) // Business: 0.141, Entertainment: 0.138, Politics: 0.113, Sports: 0.187, Technology: 0.421

Installation

CocoaPods

CocoaPods is a centralized dependency manager for Cocoa projects. To install DocumentClassifier with CocoaPods:

  1. Make sure the latest version of CocoaPods is installed.

  2. Add DocumentClassifier to your Podfile:

use_frameworks!

pod 'DocumentClassifier', '1.2.0'
  1. Run pod install.

Example App

NewsClassifier is an example app using the framework.

NewsClassifierExample

Model

Author

Todd Kramer, [email protected]

References

You might also like...
Gloth - Generates a CoreML Word Tagger Model trained on interactive fiction commands

Gloth Gloth: Fold dough 83 times Generates a CoreML Word Tagger Model trained on

Classifying Images With Vision And Core ML
Classifying Images With Vision And Core ML

Classifying Images with Vision and Core ML Preprocess photos using the Vision framework and classify them with a Core ML model. Overview With the Core

iOS Core ML implementation of waifu2x
iOS Core ML implementation of waifu2x

waifu2x on iOS Introduction This is a Core ML implementation of waifu2x. The target of this project is to run waifu2x models right on iOS devices even

MXNet to Core ML - iOS sample app
MXNet to Core ML - iOS sample app

Bring Machine Learning to iOS apps using Apache MXNet and Apple Core ML

The MobileNet neural network using Apple's new CoreML framework
The MobileNet neural network using Apple's new CoreML framework

MobileNet with CoreML This is the MobileNet neural network architecture from the paper MobileNets: Efficient Convolutional Neural Networks for Mobile

Text Classifier App for iOS, powered by Apple Vision & CreateML framework
Text Classifier App for iOS, powered by Apple Vision & CreateML framework

Text Classifier App for iOS, powered by Apple Vision & CreateML framework

Holistically-Nested Edge Detection (HED) using CoreML and Swift
Holistically-Nested Edge Detection (HED) using CoreML and Swift

HED-CoreML Holistically-Nested Edge Detection (HED) using CoreML and Swift This is the repo for tutorial, that contains an example application that ru

Demo of using TensorFlow Lite on iOS
Demo of using TensorFlow Lite on iOS

TensorFlowLiteiOS Demo of using TensorFlow Lite on iOS Use the image classification model mobilenet_quant_v1_224. This is an excerpt and arrangement o

JXA and swift code that can perform some macOS situational awareness without generating TCC prompts.

Spotlight Enumeration Kit Repo of Swift and JXA projects to leverage macOS Spotlight db data for the following: TCC folder permissions (TCC-Checker.js

Owner
Todd Kramer
Todd Kramer
TextDetection-CoreML - This project is Text Detection on iOS using Vision built-in model

This project is Text Detection on iOS using Vision built-in model. If you are interested in iOS + Machine Learning, visit here yo

tucan9389 61 Nov 17, 2022
A demo for iOS machine learning framework : Core ML

CoreMLDemo A demo for iOS machine learning framework : Core ML Only Xcode9 and above are supported. Model Places205-GoogLeNet comes from [Apple Machin

null 32 Sep 16, 2022
The example of running Depth Prediction using Core ML

DepthPrediction-CoreML This project is Depth Prediction on iOS with Core ML. If you are interested in iOS + Machine Learning, visit here you can see v

tucan9389 113 Nov 17, 2022
The example project of inferencing Semantic Segementation using Core ML

SemanticSegmentation-CoreML This project is Object Segmentation on iOS with Core ML. If you are interested in iOS + Machine Learning, visit here you c

tucan9389 248 Dec 17, 2022
The example project of inferencing Pose Estimation using Core ML

This project is Pose Estimation on iOS with Core ML. If you are interested in iOS + Machine Learning, visit here you can see various DEMOs. 한국어 README

tucan9389 636 Dec 19, 2022
Photo Assessment using Core ML and Metal.

PhotoAssessment Photo Assessment (i.e. quality score) using Core ML and Metal. ?? Article 使用 Metal 和 Core ML 评价照片质量 Parallel Computation using MPS ??

杨萧玉 59 Dec 26, 2022
Train a ML Model to detect faces. (Image classifier)

face-recognition-match Train a CoreML Model to detect faces in IOS. (Image classifier) Requeriments conda create --name face_recog python=3.6 conda ac

Jose Garfias Lopez 0 Dec 24, 2021
Converted CoreML Model Zoo.

CoreML-Models Converted CoreML Model Zoo. CoreML is a machine learning framework by Apple. If you are iOS developer, you can easly use machine learnin

MLBoy 483 Jan 5, 2023
A CoreML model which classifies images of food

Food101 for CoreML Description This is the Food101 dataset implemented in Apple's new framework called CoreML. The Food101 dataset can predict foods f

Philipp Gabriel 133 Nov 17, 2022
ImageClassification - Usage The MobileNetv2 CoreML Model with StoryBoard

Image Classification with The MobileNetV2 MobileNetV2: Inverted Residuals and Li

Hamit SEYREK 0 Jun 25, 2022