mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 22:14:57 +03:00
Cruft removal
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@4243 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
b9e433977d
commit
4c8552b16f
@ -22,27 +22,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#ifndef moses_Factor_h
|
||||
#define moses_Factor_h
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include "TypeDef.h"
|
||||
#include "Util.h"
|
||||
#include "hash.h"
|
||||
|
||||
namespace Moses
|
||||
{
|
||||
|
||||
class FactorCollection;
|
||||
|
||||
/** Represents a factor (word, POS, etc) on the E or F side
|
||||
*
|
||||
* A Factor object is a tuple of direction (Input or Output,
|
||||
* corresponding to French or English), a type (surface form,
|
||||
* POS, stem, etc), and the value of the factor.
|
||||
/** Represents a factor (word, POS, etc).
|
||||
*
|
||||
* A Factor has a contiguous identifier and string value.
|
||||
*/
|
||||
class Factor
|
||||
{
|
||||
@ -76,15 +68,15 @@ public:
|
||||
* 0 = same
|
||||
*/
|
||||
inline int Compare(const Factor &compare) const {
|
||||
if (m_ptrString < compare.m_ptrString)
|
||||
if (this < &compare)
|
||||
return -1;
|
||||
if (m_ptrString > compare.m_ptrString)
|
||||
if (this > &compare)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
//! transitive comparison used for adding objects into FactorCollection
|
||||
inline bool operator<(const Factor &compare) const {
|
||||
return m_ptrString < compare.m_ptrString;
|
||||
return this < &compare;
|
||||
}
|
||||
|
||||
// quick equality comparison. Not used
|
||||
|
@ -19,12 +19,9 @@ License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
***********************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "FactorCollection.h"
|
||||
#include "LanguageModel.h"
|
||||
#include "Util.h"
|
||||
|
||||
using namespace std;
|
||||
@ -63,14 +60,7 @@ const Factor *FactorCollection::AddFactor(FactorDirection direction
|
||||
return &ret.first->second;
|
||||
}
|
||||
|
||||
FactorCollection::~FactorCollection()
|
||||
{
|
||||
//FactorSet::iterator iter;
|
||||
//for (iter = m_collection.begin() ; iter != m_collection.end() ; iter++)
|
||||
//{
|
||||
// delete (*iter);
|
||||
//}
|
||||
}
|
||||
FactorCollection::~FactorCollection() {}
|
||||
|
||||
TO_STRING_BODY(FactorCollection);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user