Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::utility::string::SimilarStrings Class Reference

#include <string.h>

Public Member Functions

 SimilarStrings (std::string reference, double similarityFactor=0.6, bool caseSensitive=true)
 Gathers strings that are similar to the given reference string.
 
bool isSimilar (std::string const &string) const
 
bool add (std::string const &string)
 Adds the given string to the set of similar strings (if it is similar)
 
std::vector< std::string > toList () const
 Gets a list of all added strings that are similar to the reference string.
 
std::string toDidYouMeanString () const
 Returns a "Did you mean abc?" string.
 

Detailed Description

Definition at line 12 of file string.h.

Constructor & Destructor Documentation

◆ SimilarStrings()

storm::utility::string::SimilarStrings::SimilarStrings ( std::string  reference,
double  similarityFactor = 0.6,
bool  caseSensitive = true 
)

Gathers strings that are similar to the given reference string.

Parameters
reference
similarityFactorcontrols how similar the strings need to be (0 means any string is similar, 1 means only the reference string is similar)
caseSensitiveif false, lower/upper case is ignored

Definition at line 8 of file string.cpp.

Member Function Documentation

◆ add()

bool storm::utility::string::SimilarStrings::add ( std::string const &  string)

Adds the given string to the set of similar strings (if it is similar)

Returns
true, if the given string is considered similar.

Definition at line 18 of file string.cpp.

◆ isSimilar()

bool storm::utility::string::SimilarStrings::isSimilar ( std::string const &  string) const
Returns
true, if the given string is considered similar.

Definition at line 13 of file string.cpp.

◆ toDidYouMeanString()

std::string storm::utility::string::SimilarStrings::toDidYouMeanString ( ) const

Returns a "Did you mean abc?" string.

Returns

Definition at line 34 of file string.cpp.

◆ toList()

std::vector< std::string > storm::utility::string::SimilarStrings::toList ( ) const

Gets a list of all added strings that are similar to the reference string.

Definition at line 26 of file string.cpp.


The documentation for this class was generated from the following files: