Skip to content
Snippets Groups Projects
Commit cee27d09 authored by Adam Wardynski's avatar Adam Wardynski
Browse files

Remove unused code in formatters.

parent d3723f87
No related branches found
No related tags found
No related merge requests found
...@@ -5,17 +5,6 @@ namespace Wccl { ...@@ -5,17 +5,6 @@ namespace Wccl {
// ------ UnaryFunctionFormatter ----- // ------ UnaryFunctionFormatter -----
std::string UnaryFunctionFormatter::to_raw_string(
const FunctionBase& f,
const std::string& arg_str,
const char* open_bracket,
const char* close_bracket)
{
std::stringstream ss;
ss << f.raw_name() << open_bracket << arg_str << close_bracket;
return ss.str();
}
std::string UnaryFunctionFormatter::to_string( std::string UnaryFunctionFormatter::to_string(
const Corpus2::Tagset& tagset, const Corpus2::Tagset& tagset,
const FunctionBase& f, const FunctionBase& f,
...@@ -41,14 +30,4 @@ std::string BinaryFunctionFormatter::to_string( ...@@ -41,14 +30,4 @@ std::string BinaryFunctionFormatter::to_string(
return ss.str(); return ss.str();
} }
std::string BinaryFunctionFormatter::to_raw_string(
const FunctionBase& f,
const std::string& arg1_str,
const std::string& arg2_str)
{
std::stringstream ss;
ss << f.raw_name() << "(" << arg1_str << ", " << arg2_str << ")";
return ss.str();
}
} /* end ns Wccl */ } /* end ns Wccl */
...@@ -44,40 +44,6 @@ struct UnaryFunctionFormatter ...@@ -44,40 +44,6 @@ struct UnaryFunctionFormatter
arg_expr.to_string(tagset), arg_expr.to_string(tagset),
open_bracket, close_bracket); open_bracket, close_bracket);
} }
/**
* @returns Raw string representation of an unary function.
* Does not require tagset, may contain internal info
* and/or be incomplete. It is in form of
* raw_operator_name(arg_str)
* although the open and close brackets can be changed
* (some operators use [])
*/
static std::string to_raw_string(
const FunctionBase& f,
const std::string& arg_str,
const char* open_bracket = "(",
const char* close_bracket = ")");
/**
* @returns Raw string representation of an unary function.
* Does not require tagset, may contain internal info
* and/or be incomplete. It is in form of
* raw_operator_name(raw_argument_expression_string)
* although the open and close brackets can be changed
* (some operators use [])
*/
static std::string to_raw_string(
const FunctionBase& f,
const FunctionBase& arg_expr,
const char* open_bracket = "(",
const char* close_bracket = ")")
{
return to_raw_string(
f,
arg_expr.to_raw_string(),
open_bracket,
close_bracket);
}
}; };
/** /**
...@@ -148,68 +114,6 @@ struct BinaryFunctionFormatter ...@@ -148,68 +114,6 @@ struct BinaryFunctionFormatter
arg1_expr.to_string(tagset), arg1_expr.to_string(tagset),
arg2_expr.to_string(tagset)); arg2_expr.to_string(tagset));
} }
/**
* @returns Raw string representation of a binary function.
* Does not require tagset, may contain internal info
* and/or be incomplete. It is in form of
* raw_op_name(arg1_str, arg2_str)
*/
static std::string to_raw_string(
const FunctionBase& f,
const std::string& arg1_str,
const std::string& arg2_str);
/**
* @returns Raw string representation of a binary function.
* Does not require tagset, may contain internal info
* and/or be incomplete. It is in form of
* raw_op_name(arg1_str, raw_arg2_expr_string)
*/
static std::string to_raw_string(
const FunctionBase& f,
const std::string& arg1_str,
const FunctionBase& arg2_expr)
{
return to_raw_string(
f,
arg1_str,
arg2_expr.to_raw_string());
}
/**
* @returns Raw string representation of a binary function.
* Does not require tagset, may contain internal info
* and/or be incomplete. It is in form of
* raw_op_name(raw_arg1_expr_string, arg1_str)
*/
static std::string to_raw_string(
const FunctionBase& f,
const FunctionBase& arg1_expr,
const std::string& arg2_str)
{
return to_raw_string(
f,
arg1_expr.to_raw_string(),
arg2_str);
}
/**
* @returns Raw string representation of a binary function.
* Does not require tagset, may contain internal info
* and/or be incomplete. It is in form of
* raw_op_name(raw_arg1_expr_string, raw_arg2_expr_string)
*/
static std::string to_raw_string(
const FunctionBase& f,
const FunctionBase& arg1_expr,
const FunctionBase& arg2_expr)
{
return to_raw_string(
f,
arg1_expr.to_raw_string(),
arg2_expr.to_raw_string());
}
}; };
} /* end ns Wccl */ } /* end ns Wccl */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment