Пример #1
0
 inline bool check_dist(const char* function, const RealType& N, const RealType& p, RealType* result, const Policy& pol)
 {
    return check_success_fraction(
       function, p, result, pol)
       && check_N(
        function, N, result, pol);
 }
Пример #2
0
/**
 * Returns 1 if the INF code refers to a valid left component, 0 otherwise.
 */
char check_valid_right_component_for_one_INF_code(const unichar* INF_code) {
/* We produce an artifical dictionary entry with the given INF code,
 * and then, we tokenize it in order to get grammatical and inflectional
 * codes in a structured way. */
unichar temp[2000];
u_strcpy(temp,"x,");
u_strcat(temp,INF_code);
struct dela_entry* d=tokenize_DELAF_line(temp,0);
char res=(check_N(d)||check_A(d)/*||check_V_but_not_Y(d)*/)&&(!check_Nsie(d));
/* We free the artifical dictionary entry */
free_dela_entry(d);
return res;
}
Пример #3
0
/**
 * Returns 1 if the given INF code is a "N" one.
 */
char check_N(unichar* INF_code) {
/* We produce an artifical dictionary entry with the given INF code,
 * and then, we tokenize it in order to get grammatical and inflectional
 * codes in a structured way. */
unichar temp[2000];
u_strcpy(temp,"x,");
u_strcat(temp,INF_code);
struct dela_entry* d=tokenize_DELAF_line(temp,0);
char res=check_N(d);
/* We free the artifical dictionary entry */
free_dela_entry(d);
return res;
}