#include "GlobalVariables.h"

long ***m_New32Projection;
long **m_New32Projection_Clean;
long **ExpansionTerm_Clean;
long **QueryClusterN;

long **DocumentSimilarity;
long *DocumentSimilarityCount;


long **TermFreqInRelevantDocuments;
double **LastPatentConsidered;
long ExpandedTerms[200][900];
double ExpandedTermsWeight[200][900];


double Minimum[200];
long MinimumIndex[200];
long TopExpandedTermsConsider[200];
long TopExpandedTermsAdded[200];
long Size ;
long ClaimQueryItemFrequency[200][500];
long **TermFreqInWholeCollection;
long **TermSingleFreqInAllDocuments;
long Projection_32RowCount[200];
double **PatentRMScore;
long **TermFreqInAllDocuments;

unsigned long **ProjectionRows;


long GoodDocuments[200];

long **DocTermsArray_TermNumber;
long **DocTermsArray_TermFrequency;
long *DocTermsArray_TotalTerms;
long **DocTermsArray_TotalTerms_Part;

long **Projection_FoundPatentMappingNumber;
long AllTermsOccurance[200];

//Query Patents Similar Terms Extraction
long ***DocTermsArray_TermPosting;
struct J48_Tree
{
	char AttributeName[200];
	struct J48_Tree *RightNode;
	struct J48_Tree *LeftNode;
	int LeftNodeCondition;
	int RightNodeCondition;
	int LeftNodeRuleStatus;
	int RightNodeRuleStatus;
	double LeftNodeValue;
	double RightNodeValue;
	int nodeCompleted;

	int LeftNodeRuleClass;
	int RightNodeRuleClass;

	double LeftNodeRuleAccuracy;
	double RightNodeRuleAccuracy;
	int LeftMaximumSamples;
	int RightMaximumSamples;
	
	
};
struct J48_Tree *J48ParentNode;
long BestRuleMaximumSamples[200];
long GoodTermVotes[200];
long BadTermVotes[200];
double MaximumGoodBadPrediction[200];
long MaximumPredictionClass[200];
long RuleFire[200];
double unclassify_term_features[200][100];

long **PairPosting_QueryItem;
long ***QueryTermsPosting;
long **QueryTermsPostingCount;
long **PairPosting_Min;
long **PairPosting_Max;
long PairPosting_Count[200];
