Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TextSearch/Common/Constants.ecl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXPORT Constants := MODULE
EXPORT Constants := MODULE
// Limit Constants
EXPORT Max_SearchTerms := 1000;
EXPORT Max_Ops := 2 * Max_SearchTerms;
Expand Down
5 changes: 3 additions & 2 deletions TextSearch/Common/Default_Keywording.ecl
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
//Default implementation. Provides minimal functionality.
IMPORT Std.Uni;
//from me this file give defult values to varibles and interface in Ikeywording file
IMPORT Std.Uni; //to use lower case or upper case (from me)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't verbally comment on comments, but you should drop the "form me" notes.

IMPORT TextSearch.Common;
IMPORT TextSearch.Common.Types;
IMPORT TextSearch.Common.Layouts;
TermString := Types.TermString;
EquivTerm := Layouts.EquivTerm;
EquivTerm := Layouts.EquivTerm; //store all record

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment makes no sense to me.

Version := Types.Version;
NoEquiv := DATASET([],EquivTerm);
ToUpper := Uni.ToUpperCase;
Expand Down
13 changes: 4 additions & 9 deletions TextSearch/Common/FileName_Info.ecl
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
//FileName Info structured used for file name generation.
//This version includes pre-Slice management hack to support tracking update
//versions with incremental updates.
EXPORT FileName_Info := INTERFACE
EXPORT FileName_Info := INTERFACE
EXPORT STRING Prefix;
EXPORT STRING Instance; // the version for an individual instance or the Alias
EXPORT STRING AliasInstance := 'CURRENT';
EXPORT SET OF STRING AliasInstances := [AliasInstance, 'LAST', 'PAST', 'DELETED'];
EXPORT UNSIGNED2 Naming := 1; // version of naming system
EXPORT UNSIGNED2 DataVersion := 0; // placeholder for data version to build
EXPORT UNSIGNED1 Levels := 5;
EXPORT STRING UseInstance(UNSIGNED indx) := IF(indx=0, Instance, AliasInstances[indx]);
EXPORT UNSIGNED2 Naming := 1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are dropping out the work of a prior merge. Why? Did you forget to rebase?

EXPORT UNSIGNED2 DataVersion := 0;
EXPORT UNSIGNED1 Levels := 5;//from 0 to 4
END;
6 changes: 3 additions & 3 deletions TextSearch/Common/FileName_Info_Instance.ecl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//Instance of the FileName_Info block. Used to unify the names used by TextSearch.
//Instance of the FileName_Info block. Used to unify the names used by TextSearch.
IMPORT TextSearch.Common;
IMPORT STD.Str;
Info := Common.FileName_Info;
EXPORT FileName_Info_Instance(STRING aPre, STRING aInst) := MODULE(Info)
EXPORT FileName_Info_Instance(STRING aPre, STRING aInst) := MODULE(Info)//mean this module will have all field in FileName_Info
STRING wPrefix := TRIM(Str.ToUpperCase(aPre),ALL);
EXPORT STRING Prefix := IF(wPrefix<>'',
wPrefix,
FAIL(STRING,
Common.Constants.No_Prfx_code,
(STRING)Common.Constants.No_Prfx_Msg));
STRING wInst := TRIM(Str.ToUpperCase(aInst),ALL);
EXPORT STRING Instance := IF(wInst<>'', wInst, AliasInstance);
EXPORT STRING Instance := IF(wInst<>'', wInst, AliasInstance);//AliasInstance='current'
END;
28 changes: 3 additions & 25 deletions TextSearch/Common/FileNames.ecl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMPORT TextSearch.Common;
IMPORT TextSearch.Common;
//Creates file names. The names are both the names of the individual
//logical files and the container names used as aliases for a group
//of file instances.
Expand All @@ -9,11 +9,11 @@ IMPORT TextSearch.Common;
// Instance is FileName.Instance; and Suffix is the data type as below.
FileName_Info := Common.FileName_Info;

EXPORT FileNames(FileName_Info info, UNSIGNED Alias=0) := MODULE
EXPORT FileNames(FileName_Info info) := MODULE //to set name of doc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are dropping out prior work. Why?

SHARED DocSearchPrefix := '::DocSearch::Level-';
SHARED Name(STRING suffix, UNSIGNED lvl) := info.Prefix + DocSearchPrefix
+ INTFORMAT(lvl, 2, 1) + '::'
+ info.UseInstance(Alias) + '::' + suffix;
+ info.Instance + '::' + suffix;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are dropping out prior work. Why?


EXPORT DocumentIndex(UNSIGNED lvl=0) := Name('DocIndx', lvl);
EXPORT TriGramDictionary(UNSIGNED lvl=0) := Name('TriDctIndx', lvl);
Expand All @@ -28,26 +28,4 @@ EXPORT FileNames(FileName_Info info, UNSIGNED Alias=0) := MODULE
EXPORT TagDictionary(UNSIGNED lvl=0) := Name('TagIndx', lvl);
EXPORT IdentIndx(UNSIGNED1 lvl=0) := Name('IdentIndx', lvl);
EXPORT DeleteIndex(UNSIGNED1 lvl=0) := NAME('DelIndx', lvl);
EXPORT NameEnum := Common.Types.FileEnum;
EXPORT NameByEnum(NameEnum ne, UNSIGNED1 lvl=0)
:= CASE(ne,
NameEnum.DocumentIndex => DocumentIndex(lvl),
NameEnum.TriGramDictionary => TriGramDictionary(lvl),
NameEnum.TermDictionary => TermDictionary(lvl),
NameEnum.TriGramIndex => TriGramIndex(lvl),
NameEnum.TermIndex => TermIndex(lvl),
NameEnum.PhraseIndex => PhraseIndex(lvl),
NameEnum.ElementIndex => ElementIndex(lvl),
NameEnum.AttributeIndex => AttributeIndex(lvl),
NameEnum.RangeIndex => RangeIndex(lvl),
NameEnum.NameSpaceDict => NameSpaceDict(lvl),
NameEnum.TagDictionary => TagDictionary(lvl),
NameEnum.IdentIndx => IdentIndx(lvl),
NameEnum.DeleteIndex => DeleteIndex(lvl),
Name('BadEnum', lvl));
// the currently building keys. Add triGramDictionary and TriGramIndex when ready
EXPORT NameSet := [NameEnum.DocumentIndex, NameEnum.TermDictionary, NameEnum.TermIndex,
NameEnum.PhraseIndex, NameEnum.ElementIndex, NameEnum.AttributeIndex,
NameEnum.RangeIndex, NameEnum.TagDictionary, NameEnum.IdentIndx,
NameEnum.DeleteIndex];
END;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are dropping out prior work. Why?

4 changes: 2 additions & 2 deletions TextSearch/Common/IKeywording.ecl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
IMPORT TextSearch.Common.Types;
IMPORT TextSearch.Common.Layouts;
TermString := Types.TermString;
EquivTerm := Layouts.EquivTerm;
EquivTerm := Layouts.EquivTerm;//record

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are you trying to say with this comment?

Version := Types.Version;

EXPORT IKeywording := INTERFACE
EXPORT Version currentVersion;
EXPORT Version currentVersion; //define currentversion from version type fro me
EXPORT BOOLEAN hasEquivalence(TermString trm, Version v=currentVersion);
EXPORT TermString SingleKeyword(TermString trm, Version v=currentVersion);
EXPORT DATASET(EquivTerm) EquivKeywords(TermString trm, Version v=currentVersion);
Expand Down
2 changes: 1 addition & 1 deletion TextSearch/Common/Layouts.ecl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
IMPORT TextSearch.Common.Types;
IMPORT TextSearch.Inverted.Layouts AS InvertedLayouts;
EXPORT Layouts := MODULE
EXPORT DocIndex := RECORD(InvertedLayouts.Document-content)
EXPORT DocIndex := RECORD(InvertedLayouts.Document-content)//I think here error -content what is?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an error. The fields in the Content structure that are also in the Document structure are removed.

Types.KWP keywords;
Types.Position docLength;
STRING18 wunit;
Expand Down
4 changes: 2 additions & 2 deletions TextSearch/Common/NumericCollationFormat.ecl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
<Numeric collation format>

Layout in big endian:
Expand Down Expand Up @@ -39,7 +39,7 @@ EXPORT NumericCollationFormat := MODULE
int expnt = 0;
char ch = '\0';

for (int i = 0; i < (int)lenNumstr; i++)
for (int i = 0; i < lenNumstr; i++)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need the cast. Did you mistakenly drop a prior merge because you forgot to rebase?

{
if ((ch = numstr[i]) == '.')
{
Expand Down
3 changes: 2 additions & 1 deletion TextSearch/Common/Pattern_Definitions.ecl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXPORT Pattern_Definitions := MACRO
EXPORT Pattern_Definitions := MACRO
// Pure Whitespace
PATTERN LowControl := PATTERN(U'[\u0001-\u0008\u000B\u000C\u000E\u000F]');
PATTERN HighControl := PATTERN(U'[\u007F-\u009F]');
Expand Down Expand Up @@ -100,6 +100,7 @@ EXPORT Pattern_Definitions := MACRO
// Composite patterns
// Word strings
PATTERN Letter := PATTERN(U'[[:alpha:]]');
//PATTERN NOLetter := PATTERN(U'[^[:alpha:]]');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you adding a commented out pattern? Did you forget to rebase?

PATTERN LowerCase := PATTERN(U'[[:lower:]]');
PATTERN UpperCase := PATTERN(U'[[:upper:]]');
PATTERN Digit := PATTERN(U'[[:digit:]]');
Expand Down
14 changes: 6 additions & 8 deletions TextSearch/Common/Types.ecl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Types for search system
// Types for search system

EXPORT Types := MODULE
EXPORT DocNo := UNSIGNED4;
Expand All @@ -16,8 +16,9 @@ EXPORT Types := MODULE
SymbolChar, // Ampersand, Section, et cetera
NoiseChar, // Noise, such as a comma or Tab
WhiteSpace, // blanks
SpecialStr); // special keyword string
EXPORT TermTypeAsString(TermType typ) := CASE(typ,
SpecialStr, // special keyword string
AcroStr); //Initialism and Acronyms
EXPORT TermTypeAsString(TermType typ) := CASE(typ, //meaning if value is 1 then let value of type=Text string

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are you trying to say with this comment?

1 => V'Text String',
2 => V'Number',
3 => V'Date',
Expand All @@ -27,9 +28,10 @@ EXPORT Types := MODULE
7 => V'Noise Character',
8 => V'White Space',
9 => V'Special Keyword',
10 => V'Initialism and Acronyms',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing that you have not set your environment to replace tabs with blanks. This must be done. The code is just to hard to read with haphazard and random indentation.

V'Unknown');
EXPORT KeywordTTypes := [TermType.TextStr, TermType.Number,
TermType.Date, TermType.SymbolChar];
TermType.Date, TermType.SymbolChar,TermType.AcroStr];
EXPORT InvertTTypes := [TermType.TextStr, TermType.Number,
TermType.Date, TermType.Meta,
TermType.Tag, TermType.SymbolChar,
Expand Down Expand Up @@ -87,8 +89,4 @@ EXPORT Types := MODULE
EXPORT DocIdentifier := UNICODE;
EXPORT SequenceKey := STRING50;
EXPORT SlugLine := UNICODE;
EXPORT FileEnum := ENUM(UNSIGNED1, Unknown=0, DocumentIndex, TriGramDictionary,
TermDictionary, TriGramIndex, TermIndex, PhraseIndex,
ELementIndex, AttributeIndex, RangeIndex, NameSpaceDict,
TagDictionary, IdentIndx, DeleteIndex);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are dropping out prior work. Why?

END;
2 changes: 1 addition & 1 deletion TextSearch/Inverted/Base_Data.ecl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ EXPORT Base_Data(Common.FileName_Info info,
DATASET(Inv_Layouts.DocumentIngest) docsIn):= MODULE
// The documents must be enumerated
SHARED keyword_mod := Common.Default_Keywording;
EXPORT enumDocs := Inverted.EnumeratedDocs(info, docsIn);
EXPORT enumDocs := Inverted.EnumeratedDocs(info, docsIn);//start here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are you trying to say with this comment?

EXPORT rawPostings := Inverted.RawPostings(enumDocs);
EXPORT DocIndex := Inverted.DocIndex(enumDocs, UNGROUP(rawPostings));
// Need to get Replaced doc list
Expand Down
21 changes: 0 additions & 21 deletions TextSearch/Inverted/Basic_Key_List.ecl

This file was deleted.

16 changes: 2 additions & 14 deletions TextSearch/Inverted/Build_Slice_Action.ecl
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
// The action for building a slice, given the name of the Ingest file, and the
//prefix and instance for the file names.
// Optional parameter is a dataset used to list other files that we want managed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are dropping out prior work. Why?

IMPORT TextSearch.Common;
IMPORT TextSearch.Inverted;
Ingest := Inverted.Layouts.DocumentIngest;
Managed_File_Names := Inverted.Layouts.Managed_File_Names;
empty := DATASET([], Managed_File_Names);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are dropping out prior work. Why?


EXPORT Build_Slice_Action(STRING ingestName, STRING prfx, STRING inst,
DATASET(Managed_File_Names) mfn=empty) := FUNCTION

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are dropping out prior work. Why?

EXPORT Build_Slice_Action(STRING ingestName, STRING prfx, STRING inst) := FUNCTION
inDocs := DATASET(ingestName, Ingest, THOR);
info := Common.FileName_Info_Instance(prfx, inst);
kwm := Common.Default_Keywording;
Expand All @@ -22,7 +18,7 @@ EXPORT Build_Slice_Action(STRING ingestName, STRING prfx, STRING inst,
TrmDict := base.TermDict;
TagDict := base.TagDict;
Replaced := base.ReplacedDocs;
bc := PARALLEL(
ac := PARALLEL(
BUILD(Common.Keys(info).TermIndex(TrmPosts))
,BUILD(Common.Keys(info).ElementIndex(tagposts))
,BUILD(Common.Keys(info).PhraseIndex(PhrsPosts))
Expand All @@ -34,13 +30,5 @@ EXPORT Build_Slice_Action(STRING ingestName, STRING prfx, STRING inst,
,BUILD(Common.Keys(info).IdentIndex(docIndx))
,BUILD(Common.Keys(info).DeleteIndex(Replaced))
);
Task_Enum := Inverted.Layouts.Management_Task;
good_mfn := ASSERT(mfn, (task=Task_Enum.NoOp)
OR (task=Task_Enum.Replace AND logical_name<>''
AND current_name<>'' AND previous_name<>''
AND past_previous_name<>'' AND deleted_name<>'' ),
'Missing required file names for action', FAIL);
key_list := Inverted.Basic_Key_List(info) + good_mfn;
ac := SEQUENTIAL(bc, Inverted.Manage_Superkeys(info, key_list));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are dropping out prior work. Why?

RETURN ac;
END;
21 changes: 6 additions & 15 deletions TextSearch/Inverted/Layouts.ecl
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ EXPORT Layouts := MODULE
Types.SequenceKey seqKey;
Types.SlugLine slugLine;
UNICODE content;
UNICODE init;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you using tabs instead of blanks?

//string init_w_pun;
END;
EXPORT DocumentNo := RECORD
Types.DocNo id;
Types.DocNo id; //Types.DocNo mean set the type of DocNo to id
END;
EXPORT Document := RECORD(DocumentIngest)
EXPORT Document := RECORD(DocumentIngest) // this mean the Document record will have all the fields in DocumentIngest and all the filelds in DocumentNo

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment the meaning of ECL syntax?

DocumentNo;
END;
// Posting Record, generated by parsing the documents.
Expand All @@ -34,16 +36,5 @@ EXPORT Layouts := MODULE
Types.TermString tagValue;
Types.PathString pathString;
Types.TermString parentName;
END;
// Record for the machinery to manage file names with super keys (super files)
EXPORT Management_Task := ENUM(UNSIGNED1, NoOp=0, Replace); // Future
EXPORT Managed_File_Names := RECORD
STRING logical_name;
STRING current_name;
STRING previous_name;
STRING past_previous_name;
STRING deleted_name;
BOOLEAN delete_deleted;
Management_Task task;
END;
END;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are dropping out prior work. Why?

END;
END;
39 changes: 0 additions & 39 deletions TextSearch/Inverted/Manage_Superkeys.ecl

This file was deleted.

Loading