as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
create an algorithm for detecting plagiarism in a document.
user
1. accept a document as input
2. convert the document into a set of tokens
3. create a hash of each token
4. compare the hashes with a database of known plagiarized content
5. if any of the hash matches, flag the document as plagiarized 
6. if none of the hashes match, the document is considered to be non-plagiarized
assistant