Skip to content

Commit

Permalink
NLP-ENGINE-423 Added version update
Browse files Browse the repository at this point in the history
Signed-off-by: David de Hilster <[email protected]>
  • Loading branch information
ddehilster committed Jul 22, 2024
1 parent 0ec9e4d commit ccffbf3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
27 changes: 15 additions & 12 deletions lite/dicttok.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,26 +772,18 @@ switch (typ)
// Put this as a variable on the node!
int ansi = (unsigned char) *str;
replaceNum(node,_T("CTRL"),ansi);
makeTextAttrs(node,last);
findTokAttrs(node,last,con,str,lcstr);
}
break;
case PNALPHA:
case PNEMOJI:
makeTextAttrs(node,last);
con = NULL;
if (str && *str) {
con = cg_->findWordConcept(str);
}
if (!con && lcstr && *lcstr) {
con = cg_->findWordConcept(lcstr);
}
findAttrs(node, con, str, false);
findTokAttrs(node,last,con,str,lcstr);
break;
case PNNUM: // Placed here for easy reference.
++totnums_;
// Fall through to PNPUNCT for now.
case PNPUNCT:
makeTextAttrs(node,last);
findTokAttrs(node,last,con,str,lcstr);
break;
case PNWHITE:
prevwh_ = true;
Expand All @@ -808,6 +800,18 @@ else if (root_) // Sanity check.
return node;
}

void DICTTok::findTokAttrs(Node<Pn> *node, Node<Pn> *last, CONCEPT *con, _TCHAR *str, _TCHAR *lcstr) {
makeTextAttrs(node,last);
con = NULL;
if (str && *str) {
con = cg_->findWordConcept(str);
}
if (!con && lcstr && *lcstr) {
con = cg_->findWordConcept(lcstr);
}
findAttrs(node, con, str, false);
}

void DICTTok::makeTextAttrs(Node<Pn> *node, Node<Pn> *last) {
if (prevwh_)
replaceNum(node,_T("SP"),1);
Expand All @@ -821,7 +825,6 @@ void DICTTok::makeTextAttrs(Node<Pn> *node, Node<Pn> *last) {
lines_ = tabs_ = 0;
}


inline bool DICTTok::findAttrs(Node<Pn> *node, CONCEPT *con, _TCHAR *str, bool isSuggested) {
_TCHAR attrName[NAMESIZ];
_TCHAR bufval[NAMESIZ];
Expand Down
1 change: 1 addition & 0 deletions lite/dicttok.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class DICTTok : public Algo
Htab *htab
);

void findTokAttrs(Node<Pn> *node, Node<Pn> *last, CONCEPT *con, _TCHAR *str, _TCHAR *lcstr);
void makeTextAttrs(Node<Pn> *node, Node<Pn> *last);

inline bool findAttrs(
Expand Down
2 changes: 1 addition & 1 deletion nlp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ All rights reserved.
#include "lite/nlp_engine.h"
#include "version.h"

#define NLP_ENGINE_VERSION "2.12.0"
#define NLP_ENGINE_VERSION "2.12.1"

bool cmdReadArgs(int,_TCHAR*argv[],_TCHAR*&,_TCHAR*&,_TCHAR*&,_TCHAR*&,bool&,bool&,bool&);
void cmdHelpargs(_TCHAR*);
Expand Down

0 comments on commit ccffbf3

Please sign in to comment.