Python2019/homework01/task03.py

19 lines
551 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Zad 4. Napisz funkcje oov(text, vocab), która zwraca listę wyrazów
(bez duplikatów), które występują w tekście text i nie występują w liście
znanych wyrazów vocab. Argumenty funkcji text i vocab to odpowiednio łańcuch
znakowy i lista łańuchów znakowych (oov = out of vocabulary)
"""
def oov(text, vocab):
pass
input = "this is a string , which i will use for string testing"
vocab = [',', 'this', 'is', 'a', 'which', 'for', 'will', 'i']
output = ['string', 'testing', 'use']