<commit_before>#!/usr/bin/python

import rospy
from predicator_msgs.msg import *

if __name__ == '__main__':
    rospy.init_node('predicator_dummy_module')
    pub = rospy.Publisher('predicator/input', PredicateList)

    ps = PredicateList()
    ps.header.frame_id = rospy.get_name()

    ps.statements = [
            PredicateStatement(
                predicate='left_of',
                num_params=3,
                params=['Block1', 'Block2', 'ur5']),
            PredicateStatement(
                predicate='right_of',
                num_params=3,
                params=['Block2', 'Block1', 'ur5']),
            PredicateStatement(
                predicate='behind',
                num_params=3,
                params=['Block1', 'Block2', 'Block1']),
            PredicateStatement(
                predicate='ahead',
                num_params=3,
                params=['Block2', 'Block1', 'Block2']),
            PredicateStatement(
                predicate='left_of',
                num_params=3,
                params=['ur5', 'Block1', 'Block2']),
            PredicateStatement(
                predicate='right_of',
                num_params=3,
                params=['ur5', 'Block2', 'Block2']),
            PredicateStatement(
                predicate='touching',
                num_params=2,
                params=['Block1', 'Block2', '']),
            PredicateStatement(
                predicate='touching',
                num_params=2,
                params=['Block1', 'Block2', ''])
            ]

    rate = rospy.Rate(1)

    print ps
    print type(ps.statements[0].num_params)

    try:
        while not rospy.is_shutdown():
            pub.publish(ps)
            rate.sleep()
    except rospy.ROSInterruptException: pass<commit_msg>object found messages to let us do some other tests/kinds of operations on the predicator core<commit_after>#!/usr/bin/python

import rospy
from predicator_msgs.msg import *

if __name__ == '__main__':
    rospy.init_node('predicator_dummy_module')
    pub = rospy.Publisher('predicator/input', PredicateList)

    ps = PredicateList()
    ps.header.frame_id = rospy.get_name()

    ps.statements = [
            PredicateStatement(
                predicate='left_of',
                num_params=3,
                params=['Block1', 'Block2', 'ur5']),
            PredicateStatement(
                predicate='right_of',
                num_params=3,
                params=['Block2', 'Block1', 'ur5']),
            PredicateStatement(
                predicate='behind',
                num_params=3,
                params=['Block1', 'Block2', 'Block1']),
            PredicateStatement(
                predicate='ahead',
                num_params=3,
                params=['Block2', 'Block1', 'Block2']),
            PredicateStatement(
                predicate='left_of',
                num_params=3,
                params=['ur5', 'Block1', 'Block2']),
            PredicateStatement(
                predicate='right_of',
                num_params=3,
                params=['ur5', 'Block2', 'Block2']),
            PredicateStatement(
                predicate='touching',
                num_params=2,
                params=['Block1', 'Block2', '']),
            PredicateStatement(
                predicate='touching',
                num_params=2,
                params=['Block1', 'Block2', '']),
            PredicateStatement(
                predicate='found_object',
                num_params=1,
                params=['Block1','','']),
            PredicateStatement(
                predicate='found_object',
                num_params=1,
                params=['Block2','',''])
            ]

    rate = rospy.Rate(1)

    print ps
    print type(ps.statements[0].num_params)

    try:
        while not rospy.is_shutdown():
            pub.publish(ps)
            rate.sleep()
    except rospy.ROSInterruptException: pass
{'fraction_non_alphanumeric': 0.12382405288583778, 'fraction_numerical': 0.017289600813628275, 'mean_word_length': 1.6209193870752832, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5270661', 'n_tokens_mistral': 1168, 'n_tokens_neox': 1092, 'n_words': 180}