summaryrefslogtreecommitdiff
path: root/engparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'engparser.c')
-rw-r--r--engparser.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/engparser.c b/engparser.c
index 098c9fc..af511e5 100644
--- a/engparser.c
+++ b/engparser.c
@@ -10,11 +10,11 @@
*
* WordExtract is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with WordExtract. If not, see <http://www.gnu.org/licenses/>.
+ * along with WordExtract. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
@@ -23,6 +23,7 @@
#include "mainwin.h"
#include "engparser.h"
#include "word.h"
+#include "dict.h"
int lower_first_capital = 1;
int excl_w_capital = 1;
@@ -51,8 +52,9 @@ int parseengphrase(char *phrase)
}
}
else {
- if ((*word != '\0')&&!parse_eng_word(word, quote)&&!parse_eng_word(word, hyphen))
- to_list(word);
+ if ((*word != '\0')&&!parse_eng_word(word, quote)&&
+ !parse_eng_word(word, hyphen)&&!is_in_dict(word, dict))
+ words = add_word(words, word);
sentence_start = sentence_start||(phrase[k] == '.')||(phrase[k] == '!')||(phrase[k] == '?');
for (i = 0; i < WORDLENGTH; i++)
word[i] = 0;
@@ -98,7 +100,7 @@ int parse_eng_word(char *word, Parseoptions opt)
return WORD_NOT_INCLUDED;
if (opt.excl_w_middle&&mids)
return WORD_NOT_INCLUDED;
- if (opt.ecxl_w_ending&&ends&&!symbolled)
+ if (opt.excl_w_ending&&ends&&!symbolled)
return WORD_NOT_INCLUDED;
return WORD_INCLUDED;
}