[Library] Top words filtering in Filter library #8

Merged
javier merged 3 commits from library/filter/max into main 2024-03-18 15:55:10 +00:00
2 changed files with 48 additions and 0 deletions
Showing only changes of commit 2e52732300 - Show all commits

View File

@ -0,0 +1,24 @@
//
// Word.swift
// ReviewsFilterKit
//
// Created by Javier Cicchelli on 18/03/2024.
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
//
public struct Word: Equatable {
// MARK: Constants
public let term: String
public let token: String
// MARK: Initialisers
public init(
term: String,
token: String
) {
self.term = term
self.token = token
}
}

View File

@ -0,0 +1,24 @@
//
// WordCount.swift
// ReviewsFilterKit
//
// Created by Javier Cicchelli on 18/03/2024.
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
//
public struct WordCount: Equatable {
// MARK: Constants
public let count: Int
public let word: Word
// MARK: Initialisers
public init(
word: Word,
count: Int
) {
self.count = count
self.word = word
}
}