|
Roll your own. Only you know exactly what you want/need.
|
|
|
|
|
it seems like I need to build a parser for these rules too...
diligent hands rule....
|
|
|
|
|
The rules already exist? I'm confused.
|
|
|
|
|
If you do intend to go that route let me know, and let me see a sample of your rules, and I'll whip you up an XBNF grammar you can either use with one of my parser generators, or as a guide to implement a recursive descent parser on your own. I'll even recommend which route to take, and which tools to use depending on what your rules wind up needing to look like.
Real programmers use butterflies
|
|
|
|
|
thank you for the offer and definitely check with you! I browsed your post.
diligent hands rule....
|
|
|
|
|
You can use that one but it's a bit dated.
When you're ready for it, assuming you're targeting C#, I'll hook you up with Norm and Reggie (or Parsley and Rolex depending on what you want)
They are quite a bit more mature than PCK, although PCK does have a syntax highlighting editor. In practice, that isn't very helpful which is why I haven't included it in more recent projects.
Real programmers use butterflies
|
|
|
|
|
in a simple example, my dataset is a List of data points(2D such as x,y)), I want to detect at which point that reach local max , local min etc..
I created a table associated with this dataset and calculated all needed mathematical attributes such as derivatives at each point.
so I want to use type of rules in natural language like that describe and evaluate my request: max(my_List).
hope my explanation is clear. I have not done anything on business rule stuff.
diligent hands rule....
|
|
|
|
|
Parsing is like 10% of natural language processing. I'm not sure you know what you're getting into.
The other problem with doing it for business rules is ambiguity. Do you want that ambiguity leaking into your accounts receivable tables? Because this is how it happens.
The quickest dirtiest way to get natural language processing into your business rules is to use Amazon's voice recognition services, and then plug it into a rule writer based off of that.
Then take that rule writer and plug it into a system you do not care about, because it's not going to give you anything good, particularly given that the type of people who would require natural language processing to produce business rules lack the analytical chops to craft solid business rules in the first place.
Real programmers use butterflies
|
|
|
|
|
|
Fair enough, although if you're really committed to natural language parsing, Glory: A GLR Parser Generator for .NET[^] is what you'd need for that, because of the ambiguity. PCK can't parse natural languages, and extending the algorithms therein to do so is non-trivial, so it won't make a good starting point necessarily.
Also, avoid the LALR(1) generation in PCK. It's slow and I don't think it handles epsilons correctly. Glory does.
Real programmers use butterflies
|
|
|
|
|
|
I don't even see any low-hanging fruit there.
|
|
|
|
|
|
I did this research already. just check around if any better ideas exist...
diligent hands rule....
|
|
|
|
|
I built one years ago that's still in production today. It was written in C#.
The rules are not a custom language or anything of the sort. Each rule is an implemented derived class and each rule has inputs and outputs (which can be anything). Then, you just string those rules together, where the output of one rule connects to the input of another rule. This has two benefits: 1) you don't have the overhead of a custom parser for determining the end-result, i.e., it's already a language you know; 2) you can reuse these rules in various combinations for a variety of tasks.
The rules can live in the same or separate assemblies and are then loaded into an AppDomain upon execution. There is a Rule Execution Engine that takes a "map" of how each rule is connected and then loads the appropriate assemblies, from where said rules are located, and executes them in the correct order and asynchronously if needed.
This may be a simpler approach than a custom language solution. I do not have a general-purpose one written. I intended to write one years ago (after writing the one for the company I work for), but I never got around to it. This approach may or may not work for you, though.
|
|
|
|
|
|
thank you very much! I will take a look at it.
diligent hands rule....
|
|
|
|
|
Drools.NET download | SourceForge.net
I used the Java version to build a Sudoku solver that works with human strategies.
This is one those legacy Rules Based systems that have lost out to ML.
|
|
|
|
|
Last week I replaced the EPOS system in our social club which left me with three touch-screen tills (running Windows) looking for a role in life.
We have a problem with radio reception in the building and can usually only get one station on FM so the staff tend to use one of the Sky TV boxes to play a music channel though the sound system. But this falls apart if both Sky boxes are needed to show TV.
We already had an Ipod on the back bar also wired into the sound system.
So, I ran an ethernet cable from the router, through the ceiling to this point. Connected up the internet and the audio to the till and have a simple Winforms app which has 20 buttons, each with a radio station logo on the touch screen - along with a volume slider and mute/unmute button.
Just plugged it all in at lunchtime and it flew first time. The staff seem to like it ...
So, who can come up with a sillier idea than using a till (I think it cost around £1,000 when new) as a radio (worth a tenner)?
|
|
|
|
|
I mean, if it was already used and done with it has probably long since amortized its cost, so actually you're making it worth something again. Just sayin'
Real programmers use butterflies
|
|
|
|
|
Rich Leyshon wrote: So, who can come up with a sillier idea than using a till (I think it cost around £1,000 when new) as a radio (worth a tenner)?
1. Replace the front door bell with one, add an application requiring visitors to identify themselves, and use it to "screen" your visitors.
2. If you are asleep - require potential visitors to deposit a sum in the till if they wish to wake you. If, upon waking, you agree that they had a good reason, you refund the money. otherwise, you spend it on booze. [Taken from Robert Heinlein's The Cat Who Walks Through Walls]
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Repurposing an ATM to Play Doom on[^]?
Not me - I was always far to busy playing it to spend the huge time investment on that ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I've never really had any formal electronics training, so a few decades ago, I was rather happy with myself having hooked up a discarded 2-line LCD display unit (the kind you used to find attached to cash registers) to a serial port, with no documentation whatsoever, and figuring out settings (parity, baud rate, data bits, etc) through trial and error, to make it display any string sent to it. I turned it into a simple clock showing full date and time.
Definitely not much of a thing compared to what some people here manage to do, but it was enough for coworkers called me a nerd when they saw it. I wore that badge with pride...
|
|
|
|
|
... are for the people that can't get away with not wearing them.
In fact, I sort of gauge success as how much of your life you can go through without wearing them.
If you spend most of your time without pants on, you've made it in life.
Edit: If you are from the UK I am referring to trousers, not underpants, but I suppose the latter could be included if you're so inclined.
Real programmers use butterflies
modified 29-Nov-21 12:18pm.
|
|
|
|
|
Well I work from home and I suppose I don't need to wear pants most of the time, strictly speaking, but I still might need to go answer the door at a moment's notice.
Even if I didn't have to? I'd still do it, out of habit more than anything else.
|
|
|
|